From: Harsh Shandilya <msfjarvis@gmail.com>
To: devel@driverdev.osuosl.org
Cc: "Harsh Shandilya" <harsh@prjkt.io>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Martijn Coenen" <maco@android.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] drivers: android: Fix logtags in methods
Date: Fri, 22 Dec 2017 19:37:03 +0530 [thread overview]
Message-ID: <20171222140703.21235-2-msfjarvis@gmail.com> (raw)
In-Reply-To: <20171222140703.21235-1-msfjarvis@gmail.com>
From: Harsh Shandilya <harsh@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 <harsh@prjkt.io>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: Todd Kjos <tkjos@android.com>
Cc: Martijn Coenen <maco@android.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@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
next prev parent reply other threads:[~2017-12-22 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 14:07 [PATCH 1/2] drivers: android: Use octal permissions Harsh Shandilya
2017-12-22 14:07 ` Harsh Shandilya [this message]
2018-01-09 17:02 ` [PATCH 2/2] drivers: android: Fix logtags in methods Greg Kroah-Hartman
2018-01-09 19:45 ` Harsh Shandilya
2018-01-09 20:03 ` Greg Kroah-Hartman
2018-01-09 20:07 ` Harsh Shandilya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171222140703.21235-2-msfjarvis@gmail.com \
--to=msfjarvis@gmail.com \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=harsh@prjkt.io \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=tkjos@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).