[PATCH] staging: gasket: Use octal permissions instead of symbolic.

Rohit Sarkar rohitsarkar5398 at gmail.com
Wed Nov 7 12:11:29 UTC 2018


On Tue, Nov 06, 2018 at 09:12:45PM +0100, Greg KH wrote:
> On Tue, Nov 06, 2018 at 04:33:47PM +0530, Rohit Sarkar wrote:
> > Replace S_IRUGO with 0444. Issue found by checkpatch.
> > 
> > Signed-off-by: Rohit Sarkar <rohitsarkar5398 at 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 151e8edd28ea..60590ea4b760 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),   \
> >  		.data.attr_type = 0,                                           \
> 
> No, this horrid #define needs to just be removed entirely, it's not
> really needed at all.
> 
> >  	}
> >  
> > @@ -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.
> 
> Or just fix it up so this isn't needed at all, the sysfs usage in this
> driver needs major work (i.e. almost deleted entirely...)
> 
> thanks,
> 
> greg k-h

Hey,
I am relatively new to the community and I was searching for things
to work on. I would love to help with this. Do you think this would be
a good task for me to get started with as I cannot seem to guage the
difficulty of this.

Thanks,
Rohit Sarkar



More information about the devel mailing list