All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Peter Rosin" <peda@axentia.se>,
	linux-i2c <linux-i2c@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] eeprom: at24: fix coding style issues
Date: Sun, 10 Dec 2017 14:55:45 -0800	[thread overview]
Message-ID: <1512946545.26342.20.camel@perches.com> (raw)
In-Reply-To: <CAMRc=MesSDBmqLWAWw7gKz_Gaqhwuy7CtFS4gob_8Oy1ztTVHw@mail.gmail.com>

On Sun, 2017-12-10 at 19:42 +0100, Bartosz Golaszewski wrote:
> 2017-12-10 13:57 GMT+01:00 Andy Shevchenko <andy.shevchenko@gmail.com>:
> > On Thu, Dec 7, 2017 at 3:39 PM, Bartosz Golaszewski <brgl@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	other threads:[~2017-12-10 22:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 13:39 [PATCH v3 0/2] eeprom: at24: coding style fixes Bartosz Golaszewski
2017-12-07 13:39 ` [PATCH v3 1/2] eeprom: at24: fix coding style issues Bartosz Golaszewski
2017-12-10  1:31   ` Christoph Böhmwalder
2017-12-10 12:49     ` Bartosz Golaszewski
2017-12-10 12:57   ` Andy Shevchenko
2017-12-10 18:42     ` Bartosz Golaszewski
2017-12-10 22:55       ` Joe Perches [this message]
2017-12-07 13:39 ` [PATCH v3 2/2] eeprom: at24: use a common prefix for all symbols in at24.c Bartosz Golaszewski

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=1512946545.26342.20.camel@perches.com \
    --to=joe@perches.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.