From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756039AbdLVOIM (ORCPT ); Fri, 22 Dec 2017 09:08:12 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:46936 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752063AbdLVOIK (ORCPT ); Fri, 22 Dec 2017 09:08:10 -0500 X-Google-Smtp-Source: ACJfBote4uQPkmXFli4K0L8oGEVi3M06LNvpN1XCkUHeZzRjBcb85YIighvE0doK+GD6jYeEQ3KReg== From: Harsh Shandilya To: devel@driverdev.osuosl.org Cc: Harsh Shandilya , Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Martijn Coenen , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drivers: android: Fix logtags in methods Date: Fri, 22 Dec 2017 19:37:03 +0530 Message-Id: <20171222140703.21235-2-msfjarvis@gmail.com> X-Mailer: git-send-email 2.15.0.631.g7ddcec0 In-Reply-To: <20171222140703.21235-1-msfjarvis@gmail.com> References: <20171222140703.21235-1-msfjarvis@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harsh Shandilya 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 Cc: Greg Kroah-Hartman Cc: "Arve Hjønnevåg" Cc: Todd Kjos Cc: Martijn Coenen 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