From: Harsh Shandilya <ha...@prjkt.io>

Several methods in the driver were hardcoding
the function name in their logging calls which
is a checkpatch violation. Utilise the __func__
macro to avoid needing to add the function name
as is to the string.

Test: logtags in dmesg remain unaffected before
and after the patch.

Signed-off-by: Harsh Shandilya <ha...@prjkt.io>

Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Cc: "Arve Hjønnevåg" <a...@android.com>
Cc: Todd Kjos <tk...@android.com>
Cc: Martijn Coenen <m...@android.com>
Cc: de...@driverdev.osuosl.org
Cc: linux-ker...@vger.kernel.org
---
 drivers/android/binder.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index ffb31dd9191a..1e48acfe27b7 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -4467,8 +4467,8 @@ static long binder_ioctl(struct file *filp, unsigned int 
cmd, unsigned long arg)
        unsigned int size = _IOC_SIZE(cmd);
        void __user *ubuf = (void __user *)arg;
 
-       /*pr_info("binder_ioctl: %d:%d %x %lx\n",
-                       proc->pid, current->pid, cmd, arg);*/
+       // pr_info("%s: %d:%d %x %lx\n",
+       //              __func__, proc->pid, current->pid, cmd, arg);
 
        binder_selftest_alloc(&proc->alloc);
 
@@ -4631,8 +4631,9 @@ static int binder_mmap(struct file *filp, struct 
vm_area_struct *vma)
        return 0;
 
 err_bad_arg:
-       pr_err("binder_mmap: %d %lx-%lx %s failed %d\n",
-              proc->pid, vma->vm_start, vma->vm_end, failure_string, ret);
+       pr_err("%s: %d %lx-%lx %s failed %d\n",
+               __func__, proc->pid, vma->vm_start, vma->vm_end,
+               failure_string, ret);
        return ret;
 }
 
@@ -4641,8 +4642,8 @@ static int binder_open(struct inode *nodp, struct file 
*filp)
        struct binder_proc *proc;
        struct binder_device *binder_dev;
 
-       binder_debug(BINDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n",
-                    current->group_leader->pid, current->pid);
+       binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%s: %d:%d\n",
+                       __func__, current->group_leader->pid, current->pid);
 
        proc = kzalloc(sizeof(*proc), GFP_KERNEL);
        if (proc == NULL)
-- 
2.15.0.631.g7ddcec0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to