[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1512946545.26342.20.camel@perches.com>
Date: Sun, 10 Dec 2017 14:55:45 -0800
From: Joe Perches <joe@...ches.com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Peter Rosin <peda@...ntia.se>,
linux-i2c <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] eeprom: at24: fix coding style issues
On Sun, 2017-12-10 at 19:42 +0100, Bartosz Golaszewski wrote:
> 2017-12-10 13:57 GMT+01:00 Andy Shevchenko <andy.shevchenko@...il.com>:
> > On Thu, Dec 7, 2017 at 3:39 PM, Bartosz Golaszewski <brgl@...ev.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.
Powered by blists - more mailing lists