[rfc PATCH] checkpatch: allow multiple const * types

Dan Carpenter dan.carpenter at oracle.com
Sat Apr 26 19:52:26 UTC 2014


On Fri, Apr 25, 2014 at 08:29:59PM -0700, Joe Perches wrote:
> On Fri, 2014-04-25 at 10:50 +0300, Dan Carpenter wrote:
> > On Fri, Apr 25, 2014 at 01:06:44AM -0300, Nicolas Del Piano wrote:
> > > diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
> []
> > > @@ -439,6 +439,7 @@ static void *comedi_recognize(struct comedi_driver *driv, const char *name)
> > >  static void comedi_report_boards(struct comedi_driver *driv)
> > >  {
> > >  	unsigned int i;
> > > +
> > >  	const char *const *name_ptr;
> > 
> > The original code was correct.  This is a bug in checkpatch.pl.  The
> > missing line check should count any lines starting with "const" or
> > "static" as declarations.
> 
> Right, thanks for the report.
> 
> I'm not around for a couple weeks.
> I'll fix it properly later.

No stress.  These are not a big deal.  These false positives are rare,
there is no way we would have applied the patch and even if we did then
the extra blank line is harmless.

regards,
dan carpenter



More information about the devel mailing list