lkml.org 
[lkml]   [2008]   [Jun]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateFri, 6 Jun 2008 23:02:39 -0700
FromAndrew Morton <>
SubjectRe: update checkpatch.pl to version 0.19
On Fri, 6 Jun 2008 16:30:37 -0700 Greg KH <greg@kroah.com> wrote:

> On Fri, Jun 06, 2008 at 07:22:25PM +0000, Linux Kernel Mailing List wrote:
> > @@ -1920,23 +2004,16 @@ sub process {
> >  				WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev);
> >  			}
> >  		}
> > -# check for needless usb_free_urb() checks
> > -		if ($prevline =~ /\bif\s*\(([^\)]*)\)/) {
> > -			my $expr = $1;
> > -			if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) {
> > -				WARN("usb_free_urb(NULL) is safe this check is probabally not required\n" . $hereprev);
> > -			}
> > -		}
> > 
> 
> I'm curious as to why this check was removed.  Any specific reason?  It
> was valid from what I can tell.

Because of the spelling?

If so, let's be consistent:

--- a/scripts/checkpatch.pl~a
+++ a/scripts/checkpatch.pl
@@ -1997,14 +1997,6 @@ sub process {
 				$herecurr);
 		}
 
-# check for needless kfree() checks
-		if ($prevline =~ /\bif\s*\(([^\)]*)\)/) {
-			my $expr = $1;
-			if ($line =~ /\bkfree\(\Q$expr\E\);/) {
-				WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev);
-			}
-		}
-
 # warn about #ifdefs in C files
 #		if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
 #			print "#ifdef in C files should be avoided\n";
_


\
 
 \ /
  Last update: 2008-06-07 08:05    [from the cache]
©2003-2008