From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
dev-harsh1998 <harshitjain6751@gmail.com>,
trivial@kernel.org, Simon Budig <simon.budig@kernelconcepts.de>,
Andi Shyti <andi@etezian.org>,
Luca Ceresoli <luca@lucaceresoli.net>,
Guenter Roeck <linux@roeck-us.net>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/11] touchscreen: elants: Use octal permissions
Date: Mon, 23 Jul 2018 10:46:21 -0700 [thread overview]
Message-ID: <20180723174621.GF100814@dtor-ws> (raw)
In-Reply-To: <e257bc89eb082e9fdc342d6f794c15a2805c98a9.camel@perches.com>
On Mon, Jul 23, 2018 at 10:25:10AM -0700, Joe Perches wrote:
> On Mon, 2018-07-23 at 10:18 -0700, Dmitry Torokhov wrote:
> > On Mon, Jul 23, 2018 at 03:32:00PM +0200, Greg Kroah-Hartman wrote:
> > > On Mon, Jul 23, 2018 at 06:49:20PM +0530, dev-harsh1998 wrote:
> > > > WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> > > > +static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL);
> > > >
> > > > WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
> > > > +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw)
> > > >
> > > > WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> > > > + .dattr = __ATTR(_field, S_IRUGO, \
> > > >
> > > > Signed-off-by: Harshit Jain <harshitjain6751@gmail.com>
> > >
> > > This name doesn't match up with the From: line above :(
> > >
> > > Please fix up and try again.
> >
> > dtor@dtor-ws:~/kernel/linux-next$ git grep S_IRU | wc -l
> > 7605
> >
> > We either need to run a tree-wide script or leave this alone. FWIW I am
> > perfectly fine with either octals or symbolic names so I do not see
> > benefit of doing conversion for code that is not known to be broken.
>
> About half of those are in one subsystem (drivers/hwmon)
>
> $ git grep -w S_IRUGO | cut -f1,2 -d'/' | \
> sort | uniq -c | sort -rn | head -10 | cat -n
> 1 3846 drivers/hwmon
> 2 748 drivers/scsi
> 3 215 drivers/infiniband
> 4 168 drivers/usb
> 5 109 drivers/media
> 6 106 drivers/input
> 7 102 drivers/platform
> 8 101 drivers/misc
> 9 101 drivers/gpu
> 10 91 drivers/edac
>
> The generic reason is octal is readable and S_<FOO> is unintelligible.
>
> https://lkml.org/lkml/2016/8/2/1945
Yes, but please also read this one as well:
https://lkml.org/lkml/2016/8/2/2062
Thanks.
--
Dmitry
next prev parent reply other threads:[~2018-07-23 17:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 13:19 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
2018-07-23 13:19 ` [PATCH 03/11] touchscreen: ad7846: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 04/11] touchscreen: amtel: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 05/11] touchscreen: elants: " dev-harsh1998
2018-07-23 13:32 ` Greg Kroah-Hartman
2018-07-23 17:18 ` Dmitry Torokhov
2018-07-23 17:25 ` Joe Perches
2018-07-23 17:46 ` Dmitry Torokhov [this message]
2018-07-23 18:24 ` Guenter Roeck
2018-07-23 18:30 ` Joe Perches
2018-07-23 20:17 ` Harshit Jain
2018-07-23 13:19 ` [PATCH 06/11] touchscreen: ili210x: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 07/11] touchscreen: mc13783: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 08/11] touchscreen: melfas: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 09/11] touchscreen: raydium_ts: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 10/11] touchscreen: sun4i_ts: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 11/11] touchscreen: tsc200x: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 01/11] touchscreen: ft5x06: " dev-harsh1998
-- strict thread matches above, loose matches on Subject: below --
2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 05/11] touchscreen: elants: " dev-harsh1998
2018-07-22 9:39 ` Greg Kroah-Hartman
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=20180723174621.GF100814@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=andi@etezian.org \
--cc=gregkh@linuxfoundation.org \
--cc=harshitjain6751@gmail.com \
--cc=joe@perches.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luca@lucaceresoli.net \
--cc=simon.budig@kernelconcepts.de \
--cc=trivial@kernel.org \
/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).