From: Greg KH <greg@kroah.com>
To: Wentao Cai <etsai042@gmail.com>
Cc: outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] Re: [PATCH] Staging: gasket: Replace symbolic permissions with octal permissions
Date: Sun, 17 Mar 2019 11:12:12 +0100 [thread overview]
Message-ID: <20190317101212.GC26906@kroah.com> (raw)
In-Reply-To: <389b7861-7a78-429f-a150-7b2987f0f123@googlegroups.com>
On Wed, Mar 13, 2019 at 01:50:33AM -0700, Wentao Cai wrote:
>
>
> On Friday, March 1, 2019 at 12:19:07 AM UTC-8, gregkh wrote:
> >
> >
> > This is fun, it keeps coming up and no one looks in the archives to see
> > why I keep rejecting it :)
> >
> > This should be __ATTR_NULL(), but really, the whole macro can be deleted.
> >
> > > .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),
> > \
> >
> > __ATTR_RO() please.
> >
> > Hi. I just submit a patch to fix the first __ATTR_NULL, but I have some
> question about the latter one.
> I understand it is better to use read only attribute here, but by changing
> __ATTR to __ATTR_RO, since the new macro does not need the _show_function
> parameter:
>
> > (linux/sysfs.h, line 115)
> > #define __ATTR_RO(_name) { \
> > .attr = { .name = __stringify(_name), .mode = 0444 }, \
> > .show = _name##_show, \
> > }
>
> it seems to me that the second parameter in this macro should be deleted,
> which means all other file which calls this macro should be revise.
> I think it's a big code change, and don't know whether it's suitable to do
> this. Could you give me some advice?
Yes, it is a big code change, and if you are not comfortable with it, I
would not recommend it at this point in time.
This is also why no one has done it yet :)
thanks,
greg k-h
prev parent reply other threads:[~2019-03-17 10:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 8:12 [PATCH] Staging: gasket: Replace symbolic permissions with octal permissions Wentao Cai
2019-03-01 8:19 ` Greg Kroah-Hartman
2019-03-01 9:25 ` etsai042
2019-03-13 8:50 ` Wentao Cai
2019-03-17 10:12 ` Greg KH [this message]
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=20190317101212.GC26906@kroah.com \
--to=greg@kroah.com \
--cc=etsai042@gmail.com \
--cc=outreachy-kernel@googlegroups.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.