public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@shadowen.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-usb@vger.kernel.org
Subject: Re: update checkpatch.pl to version 0.19
Date: Sat, 7 Jun 2008 10:34:36 -0700	[thread overview]
Message-ID: <20080607173436.GA17603@kroah.com> (raw)
In-Reply-To: <20080606230239.c1a8c002.akpm@linux-foundation.org>

On Fri, Jun 06, 2008 at 11:02:39PM -0700, Andrew Morton wrote:
> 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);
> -			}
> -		}
> -

That's the proverbial baby with the bathwater problem here, we can fix
spelling mistakes pretty easily :)

I'd prefer the original check to be put back, and the kfree(NULL) check
to remain as well, as it too is valid.

But I would like to find out first from Andy why this was removed.  Odds
are he wasn't keeping up with the changes upstream from his local copy,
which also might have caused other things to be removed over time :(

thanks,

greg k-h

  reply	other threads:[~2008-06-07 17:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200806061922.m56JMJuq025990@hera.kernel.org>
2008-06-06 23:30 ` update checkpatch.pl to version 0.19 Greg KH
2008-06-07  6:02   ` Andrew Morton
2008-06-07 17:34     ` Greg KH [this message]
2008-06-09  8:33       ` Andy Whitcroft
2008-06-09 11:09         ` David Woodhouse
2008-06-09 22:58           ` Greg KH
2008-06-11  8:49             ` Andy Whitcroft
2008-06-09 15:56         ` Roland Dreier

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=20080607173436.GA17603@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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