linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Hardware Monitoring <linux-hwmon@vger.kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Subject: Re: [PATCH 29/30] hwmon: (vexpress-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants
Date: Mon, 21 Jan 2019 09:38:54 +0000	[thread overview]
Message-ID: <20190121093854.GC13374@e107155-lin> (raw)
In-Reply-To: <20190118185844.GB5284@roeck-us.net>

On Fri, Jan 18, 2019 at 10:58:44AM -0800, Guenter Roeck wrote:
> On Fri, Jan 18, 2019 at 06:21:57PM +0000, Sudeep Holla wrote:
> > On Fri, Jan 18, 2019 at 09:14:59AM -0800, Guenter Roeck wrote:
> > > Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
> > > to improve readbility, and to reduce the chance of inconsistencies.
> > >
> >
> > s/readbility/readability/
> >
> Nice catch ...
>
> > > Also replace any remaining S_<PERMS> in the driver with octal values.
> > >
> > > The conversion was done automatically with coccinelle. The semantic patches
> > > and the scripts used to generate this commit log are available at
> > > https://github.com/groeck/coccinelle-patches/hwmon/.
> > >
> > > This patch does not introduce functional changes. It was verified by
> > > compiling the old and new files and comparing text and data sizes.
> > >
> > > Cc: Liviu Dudau <liviu.dudau@arm.com>
> > > Cc: Sudeep Holla <sudeep.holla@arm.com>
> >
> > Not related to this patch, just thought of asking. If the intention is
> > to avoid using S_<PERMS> macros and have direct values for readability,
> > shouldn't you consider the ones as return values mainly in is_visible
> > callbacks ?
> >
>
> Not sure I understand. Can you clarify ?
>

Sorry for not being clear, I was referring to these:
$ git grep "return S_.*" drivers/hwmon/ | sort | uniq

drivers/hwmon/lm75.c:			return S_IRUGO;
drivers/hwmon/lm75.c:			return S_IRUGO | S_IWUSR;
drivers/hwmon/lm90.c:		return S_IRUGO;
drivers/hwmon/lm90.c:			return S_IRUGO | S_IWUSR;
drivers/hwmon/lm90.c:		return S_IRUGO | S_IWUSR;
drivers/hwmon/lm95241.c:			return S_IRUGO;
drivers/hwmon/lm95241.c:			return S_IRUGO | S_IWUSR;
drivers/hwmon/lm95245.c:		return S_IRUGO;
drivers/hwmon/lm95245.c:			return S_IRUGO | S_IWUSR;
drivers/hwmon/lm95245.c:		return S_IRUGO | S_IWUSR;
drivers/hwmon/ltc4245.c:			return S_IRUGO;
drivers/hwmon/max31790.c:			return S_IRUGO;
drivers/hwmon/max31790.c:			return S_IRUGO | S_IWUSR;
drivers/hwmon/nct7904.c:				return S_IRUGO;
drivers/hwmon/nct7904.c:		return S_IRUGO;
drivers/hwmon/nct7904.c:		return S_IRUGO | S_IWUSR;
drivers/hwmon/scmi-hwmon.c:		return S_IRUGO;
drivers/hwmon/tmp102.c:		return S_IRUGO;
drivers/hwmon/tmp102.c:		return S_IRUGO | S_IWUSR;
drivers/hwmon/tmp421.c:		return S_IRUGO;

--
Regards,
Sudeep

  reply	other threads:[~2019-01-21  9:38 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 17:14 [PATCH 00/30] hwmon: Use permission specific SENSOR[_DEVICE]_ATTR Guenter Roeck
2019-01-18 17:14 ` [PATCH 01/30] hwmon: (ltc4261) Use permission specific SENSOR[_DEVICE]_ATTR variants Guenter Roeck
2019-01-18 17:14 ` [PATCH 02/30] hwmon: (max16065) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 03/30] hwmon: (max1619) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 04/30] hwmon: (max31722) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 05/30] hwmon: (max31790) Replace S_<PERMS> with octal values Guenter Roeck
2019-01-18 17:14 ` [PATCH 06/30] hwmon: (max6639) Use permission specific SENSOR[_DEVICE]_ATTR variants Guenter Roeck
2019-01-18 17:14 ` [PATCH 07/30] hwmon: (max6642) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 08/30] hwmon: (max6650) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 09/30] hwmon: (mc13783-adc) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 10/30] hwmon: (nct7904) Replace S_<PERMS> with octal values Guenter Roeck
2019-01-18 17:14 ` [PATCH 11/30] hwmon: (nsa320-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants Guenter Roeck
2019-01-18 17:14 ` [PATCH 12/30] hwmon: (pc87360) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 13/30] hwmon: (pc87427) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 14/30] hwmon: (powr1220) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 15/30] hwmon: (sch5627) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 16/30] hwmon: (sch5636) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 17/30] hwmon: (scmi-hwmon) Replace S_<PERMS> with octal values Guenter Roeck
2019-01-18 17:14 ` [PATCH 18/30] hwmon: (scpi-hwmon) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 19/30] hwmon: (sht15) Use permission specific SENSOR[_DEVICE]_ATTR variants Guenter Roeck
2019-01-18 17:14 ` [PATCH 20/30] hwmon: (sht21) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 21/30] hwmon: (sht3x) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 22/30] hwmon: (smsc47b397) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 23/30] hwmon: (stts751) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 24/30] hwmon: (tc654) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 25/30] hwmon: (tc74) " Guenter Roeck
2019-01-18 17:14 ` [PATCH 26/30] hwmon: (tmp102) Replace S_<PERMS> with octal values Guenter Roeck
2019-01-18 17:14 ` [PATCH 27/30] hwmon: (tmp103) Use permission specific SENSOR[_DEVICE]_ATTR variants Guenter Roeck
2019-01-18 17:14 ` [PATCH 28/30] hwmon: (tmp421) Replace S_<PERMS> with octal values Guenter Roeck
2019-01-18 17:14 ` [PATCH 29/30] hwmon: (vexpress-hwmon) Use permission specific SENSOR[_DEVICE]_ATTR variants Guenter Roeck
2019-01-18 18:21   ` Sudeep Holla
2019-01-18 18:58     ` Guenter Roeck
2019-01-21  9:38       ` Sudeep Holla [this message]
2019-01-21 15:22         ` Guenter Roeck
2019-01-21 15:28           ` Sudeep Holla
2019-01-22  0:45             ` Guenter Roeck
2019-01-22  9:55               ` Sudeep Holla
2019-01-18 18:22   ` Liviu Dudau
2019-01-18 18:55     ` Guenter Roeck
2019-01-18 17:15 ` [PATCH 30/30] hwmon: (via-cputemp) " Guenter Roeck

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=20190121093854.GC13374@e107155-lin \
    --to=sudeep.holla@arm.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=liviu.dudau@arm.com \
    --cc=lorenzo.pieralisi@arm.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 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).