From: Greg KH <gregkh@linuxfoundation.org>
To: Slawomir Stepien <sst@poczta.fm>
Cc: apw@canonical.com, joe@perches.com, linux-iio@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: Re: [RFC] Resolving "false positive" error message from checkpatch.pl
Date: Fri, 3 Feb 2017 13:32:09 +0100 [thread overview]
Message-ID: <20170203123209.GA32306@kroah.com> (raw)
In-Reply-To: <20170203121020.GA8635@x220.localdomain>
On Fri, Feb 03, 2017 at 01:10:20PM +0100, Slawomir Stepien wrote:
> On Feb 03, 2017 11:27, Greg KH wrote:
> > On Fri, Feb 03, 2017 at 11:11:35AM +0100, Slawomir Stepien wrote:
> > > Hi all
> > >
> > > There is a "false positive" error reported by checkpatch.pl:
> > >
> > > ERROR: Use 4 digit octal (0777) not decimal permissions
> > > #272: FILE: drivers/staging/iio/meter/ade7759.c:272:
> > > +static IIO_DEV_ATTR_CH_OFF(1, S_IWUSR | S_IRUGO,
> > > + ade7759_read_8bit,
> > > + ade7759_write_8bit,
> > > + ADE7759_CH1OS);
> > >
> > > ERROR: Use 4 digit octal (0777) not decimal permissions
> > > #276: FILE: drivers/staging/iio/meter/ade7759.c:276:
> > > +static IIO_DEV_ATTR_CH_OFF(2, S_IWUSR | S_IRUGO,
> > > + ade7759_read_8bit,
> > > + ade7759_write_8bit,
> > > + ADE7759_CH2OS);
> > >
> > > The same for the file drivers/staging/iio/meter/ade7753.c.
> > >
> > > We can see that this macro is matched by the pattern "IIO_DEV_ATTR_[A-Z_]+" from
> > > @mode_permission_funcs in checkpatch.pl.
> > >
> > > My question is: how this should be fixed?
> >
> > Why do you think this is a false-positive?
>
> Because the 1st arg of that macro is not supposed to be a permissions flags.
Ah. I was thinking that the S_IWUSR needs to be replaced with an octal
value :)
thanks,
greg k-h
next prev parent reply other threads:[~2017-02-03 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 10:11 [RFC] Resolving "false positive" error message from checkpatch.pl Slawomir Stepien
2017-02-03 10:27 ` Greg KH
2017-02-03 12:10 ` Slawomir Stepien
2017-02-03 12:32 ` Greg KH [this message]
2017-02-03 12:39 ` Joe Perches
2017-02-03 13:04 ` Slawomir Stepien
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=20170203123209.GA32306@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=apw@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=joe@perches.com \
--cc=linux-iio@vger.kernel.org \
--cc=sst@poczta.fm \
/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.