linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Soham Biswas <sohambiswas41@gmail.com>
Cc: thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de,
	linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: core: Use octal permission
Date: Wed, 18 Nov 2020 08:51:13 +0000	[thread overview]
Message-ID: <20201118085113.GO1869941@dell> (raw)
In-Reply-To: <CAMmt7eO5te05AuVC+MR-zLB-z+r9FCuJwtON=1QXXY2YwQG0eg@mail.gmail.com>

On Tue, 17 Nov 2020, Soham Biswas wrote:

> This fixes the following warning:
> 
> `drivers/pwm/core.c:1341: WARNING: Symbolic permissions 'S_IRUGO' are
> not preferred. Consider using octal permissions '0444'.`
> 
> generated by the following script:
> 
> `./scripts/checkpatch.pl --file --terse drivers/pwm/core.c`

Oh, it's a checkpatch.pl thing.

You should definitely quote the warning and describe where it came
from in the commit log.

Not entirely sure what that warning is the result of.  Probably as
they're sightly harder to read and easier to get wrong.  Still, I'll
let Thierry decide whether the patch itself is suitable for inclusion
into the PWM core.

> On Tue, 17 Nov 2020 at 23:42, Lee Jones <lee.jones@linaro.org> wrote:
> >
> > On Tue, 17 Nov 2020, Soham Biswas wrote:
> >
> > > Fixed Warning.
> >
> > Which warning does this fix?
> >
> > > Replaced symbolic permission 'S_IRUGO' with octal permission '0444'.
> >
> > This is semantically equivalent.
> >
> > Not sure what and/or how this fixes anything.
> >
> > > Signed-off-by: Soham Biswas <sohambiswas41@gmail.com>
> > > ---
> > >  drivers/pwm/core.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
> > > index 1f16f5365d3c..a8eff4b3ee36 100644
> > > --- a/drivers/pwm/core.c
> > > +++ b/drivers/pwm/core.c
> > > @@ -1338,7 +1338,7 @@ DEFINE_SEQ_ATTRIBUTE(pwm_debugfs);
> > >
> > >  static int __init pwm_debugfs_init(void)
> > >  {
> > > -     debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL,
> > > +     debugfs_create_file("pwm", S_IFREG | 0444, NULL, NULL,
> > >                           &pwm_debugfs_fops);
> > >
> > >       return 0;
> >

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-11-18  8:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 17:54 [PATCH] pwm: core: Use octal permission Soham Biswas
2020-11-17 18:12 ` Lee Jones
2020-11-17 18:21   ` Soham Biswas
2020-11-18  8:51     ` Lee Jones [this message]
2020-11-18  9:35       ` Uwe Kleine-König
2020-11-18  9:41         ` Joe Perches
2020-11-18  9:49           ` Lee Jones
2020-11-18  9:50           ` Uwe Kleine-König
2020-11-18 10:47 ` Soham Biswas
2020-11-18 12:43   ` [PATCH v2] " Uwe Kleine-König
2020-11-18 13:41     ` Soham Biswas
2020-11-18 13:48       ` Uwe Kleine-König
2020-11-18 13:49       ` Lee Jones
2020-11-18 13:58 ` [PATCH] " Soham Biswas
2020-11-18 14:06   ` Soham Biswas
2020-11-18 14:21     ` Uwe Kleine-König
2020-11-18 14:46       ` Lee Jones
2020-11-18 16:56         ` Uwe Kleine-König
2020-11-18 17:39           ` Soham Biswas
2020-11-18 14:51 ` [PATCH v3] " Soham Biswas
2020-11-18 14:55   ` Soham Biswas
2020-11-18 17:59   ` Thierry Reding
2020-11-18 18:39     ` Soham Biswas
2020-11-18 19:48     ` Uwe Kleine-König

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=20201118085113.GO1869941@dell \
    --to=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=sohambiswas41@gmail.com \
    --cc=thierry.reding@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).