staging: Android: Fix some checkpatch warnings
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 5 Jun 2012 11:10:10 +0000 (16:40 +0530)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 22 Apr 2021 08:32:45 +0000 (10:32 +0200)
Warnings reported by checkpatch.pl have been fixed.

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: I5e611019438fe798ff1eef2bd25412dc4a764124

drivers/staging/android/logger.c

index b2e71c6..f7b8237 100644 (file)
@@ -17,6 +17,8 @@
  * GNU General Public License for more details.
  */
 
+#define pr_fmt(fmt) "logger: " fmt
+
 #include <linux/sched.h>
 #include <linux/module.h>
 #include <linux/fs.h>
@@ -621,13 +623,13 @@ static int __init create_log(char *log_name, int size)
        /* finally, initialize the misc device for this log */
        ret = misc_register(&log->misc);
        if (unlikely(ret)) {
-               printk(KERN_ERR "logger: failed to register misc "
-                      "device for log '%s'!\n", log->misc.name);
+               pr_err("failed to register misc device for log '%s'!\n",
+                               log->misc.name);
                goto out_free_log;
        }
 
-       printk(KERN_INFO "logger: created %luK log '%s'\n",
-              (unsigned long) log->size >> 10, log->misc.name);
+       pr_info("created %luK log '%s'\n",
+               (unsigned long) log->size >> 10, log->misc.name);
 
        return 0;