From: Joe Perches <joe@perches.com>
To: Nishad Kamdar <nishadkamdar@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Christian Lütke-Stetzkamp" <christian@lkamp.de>,
NeilBrown <neil@brown.name>, "John Crispin" <blogic@openwrt.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: mt7621-mmc: Use __func__ instead of __FUNCTION__ in dbg.h
Date: Thu, 16 Aug 2018 13:07:41 -0700 [thread overview]
Message-ID: <60b91f3fc3dce48e2da0c9f2a7896d84829e1d25.camel@perches.com> (raw)
In-Reply-To: <20180816194943.GA25895@nishad>
On Fri, 2018-08-17 at 01:19 +0530, Nishad Kamdar wrote:
> Use the identifier __func__ instead of gcc specific __FUNCTION__
> in dbg.h. Limit these lines to 80 characters. Issues found by
> checkpatch.
It looks like there are 4 uses in -next
drivers/staging/mt7621-mmc/dbg.h:110: host->id, ##args , __FUNCTION__, __LINE__, current->comm, current->pid); \
drivers/staging/mt7621-mmc/dbg.h:118: host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \
drivers/staging/mt7621-mmc/dbg.h:129: host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \
drivers/staging/mt7621-mmc/dbg.h:136: host->id, ##args, __FUNCTION__, __LINE__); \
If you are going to fix this by substitution,
please fix all of them, even if commented out.
And likely, all these uses should all be converted
to dev_<level> instead without __func__ or __LINE__
or current->comm and current->pid.
And relatedly, these are single statement macros and
don't need do while (0);
And the ; after while (0) is unnecessary.
> Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
> ---
> drivers/staging/mt7621-mmc/dbg.h | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h
> index 2f2c56b73987..5da275239d7c 100644
> --- a/drivers/staging/mt7621-mmc/dbg.h
> +++ b/drivers/staging/mt7621-mmc/dbg.h
> @@ -115,7 +115,8 @@ do { \
> #define ERR_MSG(fmt, args...) \
> do { \
> printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
> - host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \
> + host->id, ##args, __func__, __LINE__, current->comm, \
> + current->pid); \
> } while (0);
>
> #if 1
> @@ -126,14 +127,15 @@ do { \
> #define INIT_MSG(fmt, args...) \
> do { \
> printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
> - host->id, ##args, __FUNCTION__, __LINE__, current->comm, current->pid); \
> + host->id, ##args, __func__, __LINE__, current->comm, \
> + current->pid); \
> } while (0);
>
> /* PID in ISR in not corrent */
> #define IRQ_MSG(fmt, args...) \
> do { \
> printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d>\n", \
> - host->id, ##args, __FUNCTION__, __LINE__); \
> + host->id, ##args, __func__, __LINE__); \
> } while (0);
> #endif
>
next prev parent reply other threads:[~2018-08-16 20:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 19:49 Nishad Kamdar
2018-08-16 20:07 ` Joe Perches [this message]
2018-08-18 11:29 ` Nishad Kamdar
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=60b91f3fc3dce48e2da0c9f2a7896d84829e1d25.camel@perches.com \
--to=joe@perches.com \
--cc=blogic@openwrt.org \
--cc=christian@lkamp.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil@brown.name \
--cc=nishadkamdar@gmail.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
all inboxes | Powered by JetHome®