Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Joe Perches
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 =


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Dan Carpenter
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Kumar amit mehta
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Dan Carpenter
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Dan Carpenter
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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Kumar amit mehta
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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Dan Carpenter
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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: gdm72xx: wm_ioctl.h: fixed a macro coding style

2012-11-02 Thread Joe Perches
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 =


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/