* [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style @ 2012-11-02 6:42 Kumar Amit Mehta 2012-11-02 6:55 ` Dan Carpenter 0 siblings, 1 reply; 5+ messages in thread From: Kumar Amit Mehta @ 2012-11-02 6:42 UTC (permalink / raw) To: gregkh; +Cc: syahn, devel, linux-kernel fix for macro coding style. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> --- drivers/staging/gdm72xx/wm_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gdm72xx/wm_ioctl.h b/drivers/staging/gdm72xx/wm_ioctl.h index 9f46e06..4ceecc4 100644 --- a/drivers/staging/gdm72xx/wm_ioctl.h +++ b/drivers/staging/gdm72xx/wm_ioctl.h @@ -91,7 +91,7 @@ struct wm_req_s { }; #ifndef ifr_name -#define ifr_name ifr_ifrn.ifrn_name +#define ifr_name (ifr_ifrn.ifrn_name) #endif #endif -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style 2012-11-02 6:42 [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style Kumar Amit Mehta @ 2012-11-02 6:55 ` Dan Carpenter 2012-11-02 7:36 ` Kumar amit mehta 0 siblings, 1 reply; 5+ messages in thread From: Dan Carpenter @ 2012-11-02 6:55 UTC (permalink / raw) To: Kumar Amit Mehta; +Cc: gregkh, devel, syahn, linux-kernel On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: > fix for macro coding style. > No. The parenthesis are not needed. I assume this is a checkpatch.pl warning? regards, dan carpenter ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style 2012-11-02 6:55 ` Dan Carpenter @ 2012-11-02 7:36 ` Kumar amit mehta 2012-11-02 8:14 ` Dan Carpenter 0 siblings, 1 reply; 5+ messages in thread From: Kumar amit mehta @ 2012-11-02 7:36 UTC (permalink / raw) To: Dan Carpenter; +Cc: gregkh, devel, syahn, linux-kernel On Fri, Nov 02, 2012 at 09:55:55AM +0300, Dan Carpenter wrote: > On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: > > fix for macro coding style. > > > > No. The parenthesis are not needed. I assume this is a > checkpatch.pl warning? > > regards, > dan carpenter > Running checkpatch.pl on this file (wm_ioctl.h) returns error. Thanks, Amit ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style 2012-11-02 7:36 ` Kumar amit mehta @ 2012-11-02 8:14 ` Dan Carpenter 2012-11-02 8:50 ` Joe Perches 0 siblings, 1 reply; 5+ messages in thread From: Dan Carpenter @ 2012-11-02 8:14 UTC (permalink / raw) To: Kumar amit mehta Cc: devel, gregkh, syahn, linux-kernel, Andy Whitcroft, Joe Perches On Fri, Nov 02, 2012 at 12:36:30AM -0700, Kumar amit mehta wrote: > On Fri, Nov 02, 2012 at 09:55:55AM +0300, Dan Carpenter wrote: > > On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: > > > fix for macro coding style. > > > > > > > No. The parenthesis are not needed. I assume this is a > > checkpatch.pl warning? > > > > regards, > > dan carpenter > > > Running checkpatch.pl on this file (wm_ioctl.h) returns error. > I think there are patches which fix checkpatch.pl for this but they haven't been merged yet? $ ./scripts/checkpatch.pl -f drivers/staging/gdm72xx/wm_ioctl.h ERROR: Macros with complex values should be enclosed in parenthesis #94: FILE: staging/gdm72xx/wm_ioctl.h:94: +#define ifr_name ifr_ifrn.ifrn_name total: 1 errors, 0 warnings, 97 lines checked regards, dan carpenter ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style 2012-11-02 8:14 ` Dan Carpenter @ 2012-11-02 8:50 ` Joe Perches 0 siblings, 0 replies; 5+ messages in thread From: Joe Perches @ 2012-11-02 8:50 UTC (permalink / raw) To: Dan Carpenter Cc: Kumar amit mehta, devel, gregkh, syahn, linux-kernel, Andy Whitcroft On Fri, 2012-11-02 at 11:14 +0300, Dan Carpenter wrote: > On Fri, Nov 02, 2012 at 12:36:30AM -0700, Kumar amit mehta wrote: > > On Fri, Nov 02, 2012 at 09:55:55AM +0300, Dan Carpenter wrote: > > > On Thu, Nov 01, 2012 at 11:42:59PM -0700, Kumar Amit Mehta wrote: > > > > fix for macro coding style. > > > > > > > > > > No. The parenthesis are not needed. I assume this is a > > > checkpatch.pl warning? > > > > > > regards, > > > dan carpenter > > > > > Running checkpatch.pl on this file (wm_ioctl.h) returns error. > > > > I think there are patches which fix checkpatch.pl for this but they > haven't been merged yet? > > $ ./scripts/checkpatch.pl -f drivers/staging/gdm72xx/wm_ioctl.h > ERROR: Macros with complex values should be enclosed in parenthesis > #94: FILE: staging/gdm72xx/wm_ioctl.h:94: > +#define ifr_name ifr_ifrn.ifrn_name > > total: 1 errors, 0 warnings, 97 lines checked Maybe: scripts/checkpatch.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ec58d31..b3c6a00 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2916,7 +2916,7 @@ sub process { if ($dstat ne '' && $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(), $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo(); - $dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo + $dstat !~ /^[!~-]?(?:$Ident|$Constant|$Lval)$/ && # 10 // foo() // !foo // ~foo // -foo // foo.bar[baz]->bop $dstat !~ /^'X'$/ && # character constants $dstat !~ /$exceptions/ && $dstat !~ /^\.$Ident\s*=/ && # .foo = ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-02 11:32 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-02 6:42 [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style Kumar Amit Mehta 2012-11-02 6:55 ` Dan Carpenter 2012-11-02 7:36 ` Kumar amit mehta 2012-11-02 8:14 ` Dan Carpenter 2012-11-02 8:50 ` Joe Perches
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox