Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751673AbdHRLZn convert rfc822-to-8bit (ORCPT ); Fri, 18 Aug 2017 07:25:43 -0400 Received: from ozlabs.org ([103.22.144.67]:48787 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbdHRLZm (ORCPT ); Fri, 18 Aug 2017 07:25:42 -0400 From: Michael Ellerman To: Michal =?utf-8?Q?Such=C3=A1nek?= , SZ Lin Cc: Linuxppc-dev , linux-kernel@vger.kernel.org, jarkko.sakkinen@linux.intel.com, jgunthorpe@obsidianresearch.com, tpmdd-devel@lists.sourceforge.net, paulus@samba.org, ashleydlai@gmail.com, peterhuewe@gmx.de, linuxppc-dev@lists.ozlabs.org, tpmdd@selhorst.ne Subject: Re: [PATCH 5/5] Use __func__ instead of function name In-Reply-To: <0e2d9ac4f5ee02e9df98610ed07eaec9@suse.de> References: <20170729072433.13194-1-sz.lin@moxa.com> <20170729072433.13194-6-sz.lin@moxa.com> <0e2d9ac4f5ee02e9df98610ed07eaec9@suse.de> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Fri, 18 Aug 2017 21:25:39 +1000 Message-ID: <87378pqfrg.fsf@concordia.ellerman.id.au> 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 Content-Length: 1044 Lines: 33 Michal Suchánek writes: > On 2017-07-29 09:24, SZ Lin wrote: >> Fix following checkpatch.pl warning: >> WARNING: Prefer using '"%s...", __func__' to using >> the function's name, in a string >> >> Signed-off-by: SZ Lin >> --- >> drivers/char/tpm/tpm_ibmvtpm.c | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/char/tpm/tpm_ibmvtpm.c >> b/drivers/char/tpm/tpm_ibmvtpm.c >> index e75a674b44ac..2d33acc43e25 100644 >> --- a/drivers/char/tpm/tpm_ibmvtpm.c >> +++ b/drivers/char/tpm/tpm_ibmvtpm.c >> @@ -151,7 +151,7 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, >> u8 *buf, size_t count) >> rc = ibmvtpm_send_crq(ibmvtpm->vdev, be64_to_cpu(word[0]), >> be64_to_cpu(word[1])); >> if (rc != H_SUCCESS) { >> - dev_err(ibmvtpm->dev, "tpm_ibmvtpm_send failed rc=%d\n", rc); >> + dev_err(ibmvtpm->dev, "%s failed rc=%d\n", __func__, rc); > > Can function name contain a %? Let's hope not. $ git grep "%s.*__func__" | wc -l 16937 cheers