efi: efivars: add efivars printk prefix
authorJohan Hovold <johan+linaro@kernel.org>
Thu, 19 Jan 2023 16:42:52 +0000 (17:42 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 23 Jan 2023 11:32:21 +0000 (12:32 +0100)
Add an 'efivars: ' printk prefix to make the log entries stand out more,
for example:

efivars: Registered efivars operations

While at it, change the sole remaining direct printk() call to pr_err().

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/vars.c

index aa5ba38..f34e774 100644 (file)
@@ -6,6 +6,8 @@
  * Copyright (C) 2004 Intel Corporation <matthew.e.tolentino@intel.com>
  */
 
+#define pr_fmt(fmt) "efivars: " fmt
+
 #include <linux/types.h>
 #include <linux/sizes.h>
 #include <linux/errno.h>
@@ -90,7 +92,7 @@ int efivars_unregister(struct efivars *efivars)
                return -EINTR;
 
        if (!__efivars) {
-               printk(KERN_ERR "efivars not registered\n");
+               pr_err("efivars not registered\n");
                rv = -EINVAL;
                goto out;
        }