[PATCH] staging: comedi: ni_*

Greg Kroah-Hartman gregkh at linuxfoundation.org
Wed Dec 13 12:07:33 UTC 2017


On Wed, Dec 13, 2017 at 05:16:13PM +0530, Aniruddha Shastri wrote:
> On Wed, Dec 13, 2017 at 4:20 PM, Greg Kroah-Hartman
> <gregkh at linuxfoundation.org> wrote:
> >
> > On Wed, Dec 13, 2017 at 04:01:04AM -0600, Aniruddha Shastri wrote:
> > > Fix checkpatch warnings by shortening lines and reorganizing code where needed..
> > > Re-phrase the assert messages in ni_mio_common.c. This was done to meet the character limit for the message.
> >
> > And yet this line is over the character length :)
> Aniruddha: Thanks for pointing this out, I'll amend the commit message. :)

Why put your name in the response?  Of course I know it's you who is
writing this :)

> > >               range_table_list = kmalloc_array(32,
> > > -                                              sizeof(struct comedi_lrange *),
> > > +                                              range_size,
> >
> > Not worth changing.
> 
> Aniruddha: The original checkpatch.pl warning instructed to use
> const struct comedi_lrange instead of struct. Adding the 'const' put this
> line over the limit, so that's why I pulled it out into a local variable.

Checkpatch is a "hint", don't always follow it, it can cause some code
to look really bad.  It's not a hard-rule.

thanks,

greg k-h


More information about the devel mailing list