On Sun, 2017-12-10 at 19:42 +0100, Bartosz Golaszewski wrote:
> 2017-12-10 13:57 GMT+01:00 Andy Shevchenko <andy.shevche...@gmail.com>:
> > On Thu, Dec 7, 2017 at 3:39 PM, Bartosz Golaszewski <b...@bgdev.pl> wrote:
> > > Fix issues reported by checkpatch for at24.c.
> > > +module_param(io_limit, uint, 0000);
> > > +module_param(write_timeout, uint, 0000);
> > 
> > 
> > 0 is a pretty much octal number as 0000.
> > So, I would prefer not to blindly follow the stupid advise from
> > checkpatch, better to teach checkpatch about 0.
> > 
> > 
> 
> I submitted a patch for that - let's see what checkpatch maintainers say.

Personally, I prefer 4 digit octal in most cases as it
shows the coder knows that the argument is a permissions
use and not just some generic 0.

There are not many uses of 0 for permissions outside of
module_param*.

I suppose all the variants of module_param calls, as a
0 there is specifically a "not to appear in sysfs" flag,
could or should be excluded from that octal test.


Reply via email to