All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mamta Shukla <mamtashukla555@gmail.com>
To: greg@kroah.com
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.com,
	 Rob Springer <rspringer@google.com>,
	Todd Poynor <toddpoynor@google.com>,
	benchan@chromium.org
Subject: Re: [PATCH] staging: gasket: Replace symbolic permissions with octal permissions
Date: Wed, 10 Oct 2018 18:40:54 +0530	[thread overview]
Message-ID: <CAMNCNOUWh4XCOxJ_Ovy2CmEs=zT8PQzGr_8U4H-0uAqfifhzgQ@mail.gmail.com> (raw)
In-Reply-To: <20181009125546.GA2700@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

On Tue, Oct 9, 2018 at 6:25 PM Greg KH <greg@kroah.com> wrote:

> On Sat, Oct 06, 2018 at 08:03:16PM +0530, Mamta Shukla wrote:
> > Use octal permissions in place of symbolic permissions to fix checkpatch
> > warning.
> > WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
> > using octal permissions '0444'.
> >
> > Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> > ---
> >  drivers/staging/gasket/gasket_sysfs.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/gasket/gasket_sysfs.h
> b/drivers/staging/gasket/gasket_sysfs.h
> > index f32eaf8..8b563d2 100644
> > --- a/drivers/staging/gasket/gasket_sysfs.h
> > +++ b/drivers/staging/gasket/gasket_sysfs.h
> > @@ -40,7 +40,7 @@
> >   */
> >  #define GASKET_END_OF_ATTR_ARRAY
>        \
> >       {
>     \
> > -             .attr = __ATTR(GASKET_ARRAY_END_TOKEN, S_IRUGO, NULL,
> NULL),   \
> > +             .attr = __ATTR(GASKET_ARRAY_END_TOKEN, 0444, NULL, NULL),
>  \
>
> >This is very odd, why is this define even needed?
>

This  gasket_sysfs.h and gasket_sysfs.c utility allows gasket driver
framework to maintain their own set of sysfs entries. This was for
terminating
gasket_sysfs_attr array.
Is this understanding correct?



> >               .data.attr_type = 0,
>      \
> >       }
> >
> > @@ -75,7 +75,7 @@ struct gasket_sysfs_attribute {
> >
> >  #define GASKET_SYSFS_RO(_name, _show_function, _attr_type)
>        \
> >       {
>     \
> > -             .attr = __ATTR(_name, S_IRUGO, _show_function, NULL),
>     \
> > +             .attr = __ATTR(_name, 0444, _show_function, NULL),
>   \
>
> >This should use __ATTR_RO() instead, right?
>

Yes, this should be of Read only type attribute.This driver deals with
'raw' sysfs attributes.
Can I write a different patch for this?



>
> >thanks,
>
> >greg k-h
>


-- 
Mamta Shukla.

[-- Attachment #2: Type: text/html, Size: 3433 bytes --]

  reply	other threads:[~2018-10-10 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-06 14:33 [PATCH] staging: gasket: Replace symbolic permissions with octal permissions Mamta Shukla
2018-10-06 17:52 ` [Outreachy kernel] " Himanshu Jha
2018-10-09 12:55 ` Greg KH
2018-10-10 13:10   ` Mamta Shukla [this message]
2018-10-10 13:27     ` Greg KH
2019-03-01  8:12 [PATCH] Staging: " Wentao Cai
2019-03-01  8:19 ` Greg Kroah-Hartman
2019-03-01  9:25   ` etsai042
2019-03-13  8:50   ` Wentao Cai
2019-04-10 10:28 [PATCH] staging: gasket: replace " Himadri Pandya
2019-04-16 11:18 ` Greg KH

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='CAMNCNOUWh4XCOxJ_Ovy2CmEs=zT8PQzGr_8U4H-0uAqfifhzgQ@mail.gmail.com' \
    --to=mamtashukla555@gmail.com \
    --cc=benchan@chromium.org \
    --cc=greg@kroah.com \
    --cc=gregkh@linuxfoundation.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=rspringer@google.com \
    --cc=toddpoynor@google.com \
    /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.