[PATCH 9/9 v2] hwmon: (scpi) constify thermal_zone_of_device_ops structures

2017-08-08 Thread Julia Lawall
The thermal_zone_of_device_ops structure is only passed as the fourth argument to devm_thermal_zone_of_sensor_register, which is declared as const. Thus the thermal_zone_of_device_ops structure itself can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- v2: New

[PATCH 8/9 v2] hwmon: (core) constify thermal_zone_of_device_ops structures

2017-08-08 Thread Julia Lawall
The thermal_zone_of_device_ops structure is only passed as the fourth argument to devm_thermal_zone_of_sensor_register, which is declared as const. Thus the thermal_zone_of_device_ops structure itself can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- v2: New

[PATCH 0/9 v2] constify thermal_zone_of_device_ops structures

2017-08-08 Thread Julia Lawall
The thermal_zone_of_device_ops structures are only passed as the fourth argument to thermal_zone_of_sensor_register or devm_thermal_zone_of_sensor_register, both of which are declared as const. Thus the thermal_zone_of_device_ops structures themselves can be const. v2: add structures passed to dev

Re: [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures

2017-08-10 Thread Julia Lawall
On Fri, 11 Aug 2017, Zhang Rui wrote: > On Tue, 2017-08-08 at 17:08 +0200, Julia Lawall wrote: > > The thermal_zone_of_device_ops structures are only passed as the > > fourth > > argument to thermal_zone_of_sensor_register or > > devm_thermal_zone_of_sensor_register,

Re: [PATCH v2 2/2] hwmon: npcm750: add NPCM7xx PWM and Fan driver

2018-06-21 Thread Julia Lawall
On Wed, 20 Jun 2018, Joe Perches wrote: > (adding Julia Lawall and cocci mailing list) > > On Wed, 2018-06-20 at 09:48 -0700, Guenter Roeck wrote: > [] > > > +static inline void npcm7xx_fan_start_capture(struct npcm7xx_pwm_

[PATCH] hwmon: fix of_table.cocci warnings

2019-02-25 Thread Julia Lawall
From: kbuild test robot Make sure (of/i2c/platform)_device_id tables are NULL terminated Generated by: scripts/coccinelle/misc/of_table.cocci Fixes: 08c95c6f6f95 ("hwmon: (ad7418) Add device tree probing") CC: Linus Walleij Signed-off-by: kbuild test robot Signed-off-by: Ju

[hwmon:hwmon-playground 130/134] drivers/hwmon/max6650.c:632:4-10: preceding lock on line 616 (fwd)

2019-04-23 Thread Julia Lawall
Hello, It looks like a goto may be wanted on line 632. julia -- Forwarded message -- Date: Wed, 24 Apr 2019 03:38:39 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: [hwmon:hwmon-playground 130/134] drivers/hwmon/max6650.c:632:4-10: preceding lock

[PATCH] hwmon: fix devm_platform_ioremap_resource.cocci warnings

2019-09-02 Thread Julia Lawall
") CC: Jisheng Zhang Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next head: 9c551fac9ea9629cdc6deb205292c2bbe7b38917 commit: 658e687b4218b42d03a5b0b79a292c9c48f1ddaf [32/34]

Re: [PATCH v2 48/79] docs: driver-model: convert docs to ReST and rename to *.rst

2019-04-22 Thread Julia Lawall
l/devres.rst for more information. > /// > /// A difficulty of detecting this problem is that the standard freeing > /// function might be called from a different function than the one Acked-by: Julia Lawall > -- > 2.20.1 > >

[PATCH] hwmon: fix platform_no_drv_owner.cocci warnings

2016-10-06 Thread Julia Lawall
No need to set .owner here. The core will do it. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- tree: https://github.com/0day-ci/linux Chris-Packham/hwmon-Add-tc654-driver/20161007-054116 head

[PATCH 01/66] hwmon: (adm1021) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adm1021.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c index 1fdcc3e

[PATCH 63/66] hwmon: (lm95234) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm95234.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/lm95234.c b/drivers/hwmon/lm95234.c index 8796de3

[PATCH 58/66] hwmon: (k8temp) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/k8temp.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c index 734d55d..5a632bc 1006

[PATCH 53/66] hwmon: (lm90) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm90.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 322ed92..de1d61a 1006

[PATCH 66/66] hwmon: (tmp401) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/tmp401.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c index d2c..627600

[PATCH 61/66] hwmon: (emc2103) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/emc2103.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/hwmon/emc2103.c b/drivers/hwmon/e

[PATCH 49/66] hwmon: (vt8231) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/vt8231.c | 59 + 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/drivers/hwmon/vt8231.c b/

[PATCH 64/66] hwmon: (adt7475) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adt7475.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/a

[PATCH 65/66] hwmon: (fam15h_power) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/fam15h_power.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/hwmon/fam15h_power.c b/driver

[PATCH 60/66] hwmon: (lm83) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm83.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c index 9e4d0e1..cbfd0bb 100644 ---

[PATCH 62/66] hwmon: (max6650) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/max6650.c | 44 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/drivers/hwmon/max6650.c b/drivers

[PATCH 45/66] hwmon: (w83791d) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/w83791d.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c

Re: Converting DEVICE_ATTR to DEVICE_ATTR_{RO,RW,WO} and changing function names at the same time

2016-12-22 Thread Julia Lawall
On Wed, 21 Dec 2016, Guenter Roeck wrote: > Hi Julia, > > On Wed, Dec 21, 2016 at 08:39:38PM +0100, Julia Lawall wrote: > > > > > > On Wed, 21 Dec 2016, Guenter Roeck wrote: > > > > > Hi Julia, > > > > > > On Wed, Dec 21, 2016 at 03:05

[PATCH 59/66] hwmon: (adm1025) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adm1025.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/adm1025.c b/drivers/hwmon/adm1025.c index 1abb460

[PATCH 57/66] hwmon: (sch5627) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/sch5627.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/sch5627.c b/drivers/hwmon/sch5627.c index 19f85c0..91544f

[PATCH 47/66] hwmon: (f71805f) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/f71805f.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index facd05c

[PATCH 52/66] hwmon: (it87) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/it87.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index ad82cb2

[PATCH 55/66] hwmon: (pc87360) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/pc87360.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c

[PATCH 54/66] hwmon: (nct6775) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/nct6775.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index ce75dd4..2458b4

[PATCH 51/66] hwmon: (dme1737) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/dme1737.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c index 8

[PATCH 56/66] hwmon: (lm78) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm78.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/hwmon/lm78.c b/drivers/hwmo

[PATCH 23/66] hwmon: (lm85) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm85.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c index 29c8136

[PATCH 40/66] hwmon: (via686a) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/via686a.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/via686a.c b/drivers/hwmon/via686a.c index 40dd93c..81f35e

[PATCH 42/66] hwmon: (w83627hf) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/w83627hf.c | 53 --- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/drivers/hwmon/w83627hf.c b/dr

[PATCH 32/66] hwmon: (nct6683) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/nct6683.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c index 5

[PATCH 46/66] hwmon: (pc87427) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/pc87427.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/pc87427.c b/drivers/hwmon/pc87427.c index cb9fdd3..dc5a9d

[PATCH 48/66] hwmon: (w83793) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/w83793.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index 816aa6c..dab5c5

[PATCH 43/66] hwmon: (w83781d) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/w83781d.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w

[PATCH 39/66] hwmon: (via-cputemp) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/via-cputemp.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c index d

[PATCH 50/66] hwmon: (k10temp) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/k10temp.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 9cdfde6

[PATCH 41/66] hwmon: (w83627ehf) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/w83627ehf.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 697007a

[PATCH 35/66] hwmon: (sht15) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/sht15.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index a2fdbb7..f16687c 1006

[PATCH 44/66] hwmon: (w83792d) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/w83792d.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c index 0a8bce7

[PATCH 37/66] hwmon: (smsc47m1) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/smsc47m1.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c index 5d32318

[PATCH 30/66] hwmon: (mc13783-adc) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/mc13783-adc.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/mc13783-adc.c b/drivers/hwmon/mc13783-adc.c index 0

[PATCH 26/66] hwmon: (lm93) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm93.c | 39 --- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/drivers/hwmon/lm93.c b/drivers/hwmo

[PATCH 29/66] hwmon: (max197) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/max197.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/max197.c b/drivers/hwmon/max197.c index 0762856..638567

[PATCH 33/66] hwmon: (nsa320) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/nsa320-hwmon.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/nsa320-hwmon.c b/drivers/hwmon/nsa320-hwmon.c in

[PATCH 36/66] hwmon: (sis5595) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/sis5595.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/hwmon/sis5595.c b/drivers/hwmon/s

[PATCH 38/66] hwmon: (smsc47m192) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/smsc47m192.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c

[PATCH 25/66] hwmon: (lm92) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm92.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/lm92.c b/drivers/hwmon/lm92.c index cfaf70b..2a91974 1006

[PATCH 34/66] hwmon: (pcf8591) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/pcf8591.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/hwmon/pcf8591.c b/drivers/hwmon/pcf8591.c

[PATCH 16/66] hwmon: (core) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/hwmon.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 3932f92..0c5660c 1006

[PATCH 24/66] hwmon: (lm87) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm87.c | 43 ++- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/drivers/hwmon/lm87.c b/drivers/hwmo

[PATCH 27/66] hwmon: (max1111) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/max.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/max.c b/drivers/hwmon/max.c index 303d0c9..8ddd4d

[PATCH 20/66] hwmon: (lm63) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm63.c | 48 +++- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/hwmon/lm63.c b/driv

[PATCH 31/66] hwmon: (mcp3021) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/mcp3021.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/mcp3021.c b/drivers/hwmon/mcp3021.c index 1929734..de886f

[PATCH 19/66] hwmon: (jz4740) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/jz4740-hwmon.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c index 0

[PATCH 17/66] hwmon: (i5500_temp) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/i5500_temp.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/i5500_temp.c b/drivers/hwmon/i5500_temp.c index 3e3ccbf

[PATCH 21/66] hwmon: (lm70) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm70.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c index 583f883..d6ecd1a 100644 --

[PATCH 18/66] hwmon: (i5k_amb) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/i5k_amb.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index 6b3d197..a5a9f4

[PATCH 22/66] hwmon: (lm80) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/lm80.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c index 4bcd9b8..08e3945 100644 ---

[PATCH 28/66] hwmon: (max1619) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/max1619.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/max1619.c b/drivers/hwmon/max1619.c index eda9cf5..a18278

[PATCH 13/66] hwmon: (g762) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/g762.c | 86 --- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/drivers/hwmon/g762.c b/driv

[PATCH 10/66] hwmon: (f71882fg) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/f71882fg.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index cb28e4b

[PATCH 14/66] hwmon: (gl520sm) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/gl520sm.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/hwmon/gl520sm.c b/d

[PATCH 12/66] hwmon: (g760a) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/g760a.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/hwmon/g760a.c b/drivers/hwmon/g760a.c index e

[PATCH 15/66] hwmon: (gpio-fan) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/gpio-fan.c | 54 +++ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/hwmon/gpio-fan.c b/dr

[PATCH 11/66] hwmon: (fschmd) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/fschmd.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c index d58abdc..5e7822

[PATCH 08/66] hwmon: (atxp1) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/atxp1.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon

[PATCH 05/66] hwmon: (adt7470) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adt7470.c | 48 +--- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/drivers/hwmon/adt7470.c b/d

[PATCH 09/66] hwmon: (ds1621) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/ds1621.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index 8890870

[PATCH 07/66] hwmon: (asb100) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/asb100.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/

[PATCH 04/66] hwmon: (adm9240) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adm9240.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/a

[PATCH 00/66] use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
Use DEVICE_ATTR_RO etc. for read only attributes etc. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. A previous version of this semantic patch transformed only cases where the show and store functions followed particular naming conventions. This

[PATCH 06/66] hwmon: (adt7x10) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adt7x10.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/adt7x10.c b/drivers/hwmon/adt7x10.c index 98141f4..0f538f

[PATCH 03/66] hwmon: (adm1031) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adm1031.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c index a581898

[PATCH 02/66] hwmon: (adm1026) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
ntifier ro.x,ro.x_show; @@ - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); + DEVICE_ATTR_RO(x); // Signed-off-by: Julia Lawall --- drivers/hwmon/adm1026.c | 128 1 file changed, 66 insertions(+), 62 deletions(-) diff --git a/drivers/hwmon/adm1026.c b/d

Re: Converting DEVICE_ATTR to DEVICE_ATTR_{RO,RW,WO} and changing function names at the same time

2016-12-22 Thread Julia Lawall
On Thu, 22 Dec 2016, Guenter Roeck wrote: > On 12/22/2016 04:29 AM, Julia Lawall wrote: > > > > > > On Wed, 21 Dec 2016, Guenter Roeck wrote: > > > > > Hi Julia, > > > > > > On Wed, Dec 21, 2016 at 08:39:38PM +0100, Julia Lawall wrote: >

Re: [PATCH 00/66] use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Julia Lawall
> Hi Julia, > > I noticed that drivers/hwmon/gl518sm.c was not converted. Running your script > on it does not do anything. Any idea what might cause that ? I'll check. > I noticed that I get a warning if I specify a debug file: > > File "devattr-new.cocci", line 36, characters 5-6: > Warning 26:

Re: [PATCH 00/66] use permission-specific DEVICE_ATTR variants

2016-12-23 Thread Julia Lawall
> Hi Julia, > > I noticed that drivers/hwmon/gl518sm.c was not converted. Running your script > on it does not do anything. Any idea what might cause that ? I believe that it is due to the following: #define show(type, suffix, value) \ static ssize_t show_##s

Re: Converting DEVICE_ATTR to DEVICE_ATTR_{RO,RW,WO} and changing function names at the same time

2016-12-23 Thread Julia Lawall
On Fri, 23 Dec 2016, Guenter Roeck wrote: > Hi Julia, > > On Fri, Dec 23, 2016 at 04:54:41PM +0100, Julia Lawall wrote: > [ ... ] > > > > // - > > @ro@ > > declarer name SENS

[PATCH] drivers: hwmon: fix semicolon.cocci warnings

2017-01-09 Thread Julia Lawall
Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Jaghathiswari Rankappagounder Natarajan Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- url: https://github.com/0day-ci/linux/commits/Jaghathiswari-Rankappagounder-Natar ajan/Support-for-ASPEED

[PATCH] drivers: hwmon: fix device_node_continue.cocci warnings

2017-01-09 Thread Julia Lawall
Device node iterators put the previous value of the index variable, so an explicit put causes a double put. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci CC: Jaghathiswari Rankappagounder Natarajan Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- The patch

[PATCH] drivers: hwmon: fix ptr_ret.cocci warnings

2017-01-09 Thread Julia Lawall
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci CC: Jaghathiswari Rankappagounder Natarajan Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- aspeed-pwm-tacho.c |5 + 1 file changed, 1 insertion(+), 4 deletions

[PATCH] drivers: hwmon: fix platform_no_drv_owner.cocci warnings

2017-01-09 Thread Julia Lawall
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Jaghathiswari Rankappagounder Natarajan Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- aspeed-pwm-tacho.c |1 - 1 file changed, 1 deletion

Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn

2017-01-22 Thread Julia Lawall
hwmon to convert in applesmc.c > > > > Perhaps a coccinelle script? > > > > Two questions for Julia Lawall: > > > > o is there a better way to do this than repeat the blocks > > one for each replacement > > o can struct device * dev be made an arbitrary id

Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn

2017-01-23 Thread Julia Lawall
On Sun, 22 Jan 2017, Joe Perches wrote: > On Sun, 2017-01-22 at 22:43 -0800, Joe Perches wrote: > > Two questions for Julia Lawall: > > > > o is there a better way to do this than repeat the blocks > > one for each replacement > > o can struct device * de