lkml.org 
[lkml]   [2013]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2] checkpatch: Improve "return is not a function" test
On 10/31/2013 04:12 PM, Joe Perches wrote:
> Find a few more cases where parentheses are used around
> the value of a return statement.
>
> This now uses the "$balanced_parens" test and also makes
> the test depend on perl v5.10 and higher.
>
> This now finds return with parenthesis uses the old code
> did not find like:
>
> ERROR: return is not a function, parentheses are not required
> #211: FILE: arch/m68k/include/asm/sun3xflop.h:211:
> + return ((error == 0) ? 0 : -1);
>
> Signed-off-by: Joe Perches <joe@perches.com>

It catches the previous false-negative I had.

Acked-by: David Cohen <david.a.cohen@linux.intel.com>


\
 
 \ /
  Last update: 2013-11-01 02:21    [W:0.174 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site