Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures
@ 2017-08-08 15:08 Julia Lawall
  2017-08-08 15:08 ` [PATCH 1/9 v2] thermal: hisilicon: " Julia Lawall
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-08 15:08 UTC (permalink / raw)
  To: linux-rpi-kernel
  Cc: bhumirks, kernel-janitors, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, linux-pm, linux-input, linux-hwmon

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 devm_thermal_zone_of_sensor_register also.

Done with the help of Coccinelle.

---

 drivers/hwmon/hwmon.c                      |    2 +-
 drivers/hwmon/scpi-hwmon.c                 |    2 +-
 drivers/input/touchscreen/sun4i-ts.c       |    2 +-
 drivers/thermal/broadcom/bcm2835_thermal.c |    2 +-
 drivers/thermal/hisi_thermal.c             |    2 +-
 drivers/thermal/qoriq_thermal.c            |    2 +-
 drivers/thermal/rcar_gen3_thermal.c        |    2 +-
 drivers/thermal/samsung/exynos_tmu.c       |    2 +-
 drivers/thermal/zx2967_thermal.c           |    2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/9 v2] thermal: hisilicon: constify thermal_zone_of_device_ops structures
  2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
@ 2017-08-08 15:08 ` Julia Lawall
  2017-08-08 15:08 ` [PATCH 2/9 v2] thermal: qoriq: " Julia Lawall
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-08 15:08 UTC (permalink / raw)
  To: Zhang Rui
  Cc: bhumirks, kernel-janitors, Eduardo Valentin, linux-pm,
	linux-kernel

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 <Julia.Lawall@lip6.fr>

---

v2: New patch

 drivers/thermal/hisi_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index 9c3ce34..bd3572c 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -206,7 +206,7 @@ static int hisi_thermal_get_temp(void *_sensor, int *temp)
 	return 0;
 }
 
-static struct thermal_zone_of_device_ops hisi_of_thermal_ops = {
+static const struct thermal_zone_of_device_ops hisi_of_thermal_ops = {
 	.get_temp = hisi_thermal_get_temp,
 };
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/9 v2] thermal: qoriq: constify thermal_zone_of_device_ops structures
  2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
  2017-08-08 15:08 ` [PATCH 1/9 v2] thermal: hisilicon: " Julia Lawall
@ 2017-08-08 15:08 ` Julia Lawall
  2017-08-08 15:08 ` [PATCH 3/9 v2] thermal: rcar_gen3_thermal: " Julia Lawall
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-08 15:08 UTC (permalink / raw)
  To: Zhang Rui
  Cc: bhumirks, kernel-janitors, Eduardo Valentin, linux-pm,
	linux-kernel

The thermal_zone_of_device_ops structure is only passed as the fourth
argument to 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 <Julia.Lawall@lip6.fr>

---

v2: This patch was present in the original series

 drivers/thermal/qoriq_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index 4362a69..c866cc1 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -188,7 +188,7 @@ static void qoriq_tmu_init_device(struct qoriq_tmu_data *data)
 	tmu_write(data, TMR_DISABLE, &data->regs->tmr);
 }
 
-static struct thermal_zone_of_device_ops tmu_tz_ops = {
+static const struct thermal_zone_of_device_ops tmu_tz_ops = {
 	.get_temp = tmu_get_temp,
 };
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/9 v2] thermal: rcar_gen3_thermal: constify thermal_zone_of_device_ops structures
  2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
  2017-08-08 15:08 ` [PATCH 1/9 v2] thermal: hisilicon: " Julia Lawall
  2017-08-08 15:08 ` [PATCH 2/9 v2] thermal: qoriq: " Julia Lawall
@ 2017-08-08 15:08 ` Julia Lawall
  2017-08-08 15:08 ` [PATCH 4/9 v2] thermal: zx2967: " Julia Lawall
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-08 15:08 UTC (permalink / raw)
  To: Zhang Rui
  Cc: bhumirks, kernel-janitors, Eduardo Valentin, linux-pm,
	linux-kernel

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 <Julia.Lawall@lip6.fr>

---

v2: New patch

 drivers/thermal/rcar_gen3_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 37fcefd..203aca4 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -225,7 +225,7 @@ static int rcar_gen3_thermal_set_trips(void *devdata, int low, int high)
 	return 0;
 }
 
-static struct thermal_zone_of_device_ops rcar_gen3_tz_of_ops = {
+static const struct thermal_zone_of_device_ops rcar_gen3_tz_of_ops = {
 	.get_temp	= rcar_gen3_thermal_get_temp,
 	.set_trips	= rcar_gen3_thermal_set_trips,
 };

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/9 v2] thermal: zx2967: constify thermal_zone_of_device_ops structures
  2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
                   ` (2 preceding siblings ...)
  2017-08-08 15:08 ` [PATCH 3/9 v2] thermal: rcar_gen3_thermal: " Julia Lawall
@ 2017-08-08 15:08 ` Julia Lawall
  2017-08-08 15:08 ` [PATCH 5/9 v2] thermal: exynos: " Julia Lawall
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-08 15:08 UTC (permalink / raw)
  To: Zhang Rui
  Cc: bhumirks, kernel-janitors, Eduardo Valentin, linux-pm,
	linux-kernel

The thermal_zone_of_device_ops structure is only passed as the fourth
argument to 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 <Julia.Lawall@lip6.fr>

---

v2: This patch was present in the original series

 drivers/thermal/zx2967_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/zx2967_thermal.c b/drivers/thermal/zx2967_thermal.c
index a5670ad..6acce0b 100644
--- a/drivers/thermal/zx2967_thermal.c
+++ b/drivers/thermal/zx2967_thermal.c
@@ -111,7 +111,7 @@ static int zx2967_thermal_get_temp(void *data, int *temp)
 	return ret;
 }
 
-static struct thermal_zone_of_device_ops zx2967_of_thermal_ops = {
+static const struct thermal_zone_of_device_ops zx2967_of_thermal_ops = {
 	.get_temp = zx2967_thermal_get_temp,
 };
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/9 v2] thermal: exynos: constify thermal_zone_of_device_ops structures
  2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
                   ` (3 preceding siblings ...)
  2017-08-08 15:08 ` [PATCH 4/9 v2] thermal: zx2967: " Julia Lawall
@ 2017-08-08 15:08 ` Julia Lawall
  2017-08-08 15:09 ` [PATCH 7/9 v2] thermal: bcm2835: " Julia Lawall
  2017-08-11  3:36 ` [PATCH 0/9 v2] " Zhang Rui
  6 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-08 15:08 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: linux-samsung-soc, linux-pm, kernel-janitors, linux-kernel,
	Krzysztof Kozlowski, Eduardo Valentin, Kukjin Kim,
	linux-arm-kernel, Zhang Rui, bhumirks

The thermal_zone_of_device_ops structure is only passed as the fourth
argument to 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 <Julia.Lawall@lip6.fr>

---

v2: This patch was present in the original series

 drivers/thermal/samsung/exynos_tmu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 7b8ef09..ed805c7 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1286,7 +1286,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 	return 0;
 }
 
-static struct thermal_zone_of_device_ops exynos_sensor_ops = {
+static const struct thermal_zone_of_device_ops exynos_sensor_ops = {
 	.get_temp = exynos_get_temp,
 	.set_emul_temp = exynos_tmu_set_emulation,
 };

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/9 v2] thermal: bcm2835: constify thermal_zone_of_device_ops structures
  2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
                   ` (4 preceding siblings ...)
  2017-08-08 15:08 ` [PATCH 5/9 v2] thermal: exynos: " Julia Lawall
@ 2017-08-08 15:09 ` Julia Lawall
  2017-08-08 19:58   ` Stefan Wahren
  2017-08-11  3:36 ` [PATCH 0/9 v2] " Zhang Rui
  6 siblings, 1 reply; 10+ messages in thread
From: Julia Lawall @ 2017-08-08 15:09 UTC (permalink / raw)
  To: Zhang Rui
  Cc: bhumirks, kernel-janitors, Eduardo Valentin, Florian Fainelli,
	Ray Jui, Scott Branden, bcm-kernel-feedback-list, Eric Anholt,
	Stefan Wahren, linux-pm, linux-rpi-kernel, linux-arm-kernel,
	linux-kernel

The thermal_zone_of_device_ops structure is only passed as the fourth
argument to 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 <Julia.Lawall@lip6.fr>

---

v2: This patch was present in the original series

 drivers/thermal/broadcom/bcm2835_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index e6863c8..a4d6a0e 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -145,7 +145,7 @@ static void bcm2835_thermal_debugfs(struct platform_device *pdev)
 	debugfs_create_regset32("regset", 0444, data->debugfsdir, regset);
 }
 
-static struct thermal_zone_of_device_ops bcm2835_thermal_ops = {
+static const struct thermal_zone_of_device_ops bcm2835_thermal_ops = {
 	.get_temp = bcm2835_thermal_get_temp,
 };
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 7/9 v2] thermal: bcm2835: constify thermal_zone_of_device_ops structures
  2017-08-08 15:09 ` [PATCH 7/9 v2] thermal: bcm2835: " Julia Lawall
@ 2017-08-08 19:58   ` Stefan Wahren
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Wahren @ 2017-08-08 19:58 UTC (permalink / raw)
  To: Zhang Rui, Julia Lawall
  Cc: Scott Branden, Ray Jui, Eric Anholt, bhumirks, linux-kernel,
	kernel-janitors, bcm-kernel-feedback-list, Florian Fainelli,
	linux-rpi-kernel, linux-pm, linux-arm-kernel, Eduardo Valentin


> Julia Lawall <Julia.Lawall@lip6.fr> hat am 8. August 2017 um 17:09 geschrieben:
> 
> 
> The thermal_zone_of_device_ops structure is only passed as the fourth
> argument to 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 <Julia.Lawall@lip6.fr>

Still

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

> 
> ---
> 
> v2: This patch was present in the original series
> 
>  drivers/thermal/broadcom/bcm2835_thermal.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
> index e6863c8..a4d6a0e 100644
> --- a/drivers/thermal/broadcom/bcm2835_thermal.c
> +++ b/drivers/thermal/broadcom/bcm2835_thermal.c
> @@ -145,7 +145,7 @@ static void bcm2835_thermal_debugfs(struct platform_device *pdev)
>  	debugfs_create_regset32("regset", 0444, data->debugfsdir, regset);
>  }
>  
> -static struct thermal_zone_of_device_ops bcm2835_thermal_ops = {
> +static const struct thermal_zone_of_device_ops bcm2835_thermal_ops = {
>  	.get_temp = bcm2835_thermal_get_temp,
>  };
>  
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures
  2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
                   ` (5 preceding siblings ...)
  2017-08-08 15:09 ` [PATCH 7/9 v2] thermal: bcm2835: " Julia Lawall
@ 2017-08-11  3:36 ` Zhang Rui
  2017-08-11  5:17   ` Julia Lawall
  6 siblings, 1 reply; 10+ messages in thread
From: Zhang Rui @ 2017-08-11  3:36 UTC (permalink / raw)
  To: Julia Lawall, linux-rpi-kernel
  Cc: bhumirks, kernel-janitors, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, linux-pm, linux-input, linux-hwmon

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, both of which are declared as
> const.
> Thus the thermal_zone_of_device_ops structures themselves can be
> const.
> 
> v2: add structures passed to devm_thermal_zone_of_sensor_register
> also.
> 
> Done with the help of Coccinelle.
> 
I don't see the patches changes out of drivers/thermal.

As there is no dependencies between these patches, I guess I will only
take patches that changes drivers/thermal.

thanks,
rui
> ---
> 
>  drivers/hwmon/hwmon.c                      |    2 +-
>  drivers/hwmon/scpi-hwmon.c                 |    2 +-
>  drivers/input/touchscreen/sun4i-ts.c       |    2 +-
>  drivers/thermal/broadcom/bcm2835_thermal.c |    2 +-
>  drivers/thermal/hisi_thermal.c             |    2 +-
>  drivers/thermal/qoriq_thermal.c            |    2 +-
>  drivers/thermal/rcar_gen3_thermal.c        |    2 +-
>  drivers/thermal/samsung/exynos_tmu.c       |    2 +-
>  drivers/thermal/zx2967_thermal.c           |    2 +-
>  9 files changed, 9 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures
  2017-08-11  3:36 ` [PATCH 0/9 v2] " Zhang Rui
@ 2017-08-11  5:17   ` Julia Lawall
  0 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2017-08-11  5:17 UTC (permalink / raw)
  To: Zhang Rui
  Cc: Julia Lawall, linux-rpi-kernel, bhumirks, kernel-janitors,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-pm,
	linux-input, linux-hwmon

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]



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, both of which are declared as
> > const.
> > Thus the thermal_zone_of_device_ops structures themselves can be
> > const.
> >
> > v2: add structures passed to devm_thermal_zone_of_sensor_register
> > also.
> >
> > Done with the help of Coccinelle.
> >
> I don't see the patches changes out of drivers/thermal.
>
> As there is no dependencies between these patches, I guess I will only
> take patches that changes drivers/thermal.

No dependencies.  Each individual patch was only sent to its maintainers.

julia

>
> thanks,
> rui
> > ---
> >
> >  drivers/hwmon/hwmon.c                      |    2 +-
> >  drivers/hwmon/scpi-hwmon.c                 |    2 +-
> >  drivers/input/touchscreen/sun4i-ts.c       |    2 +-
> >  drivers/thermal/broadcom/bcm2835_thermal.c |    2 +-
> >  drivers/thermal/hisi_thermal.c             |    2 +-
> >  drivers/thermal/qoriq_thermal.c            |    2 +-
> >  drivers/thermal/rcar_gen3_thermal.c        |    2 +-
> >  drivers/thermal/samsung/exynos_tmu.c       |    2 +-
> >  drivers/thermal/zx2967_thermal.c           |    2 +-
> >  9 files changed, 9 insertions(+), 9 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-11  5:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08 15:08 [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures Julia Lawall
2017-08-08 15:08 ` [PATCH 1/9 v2] thermal: hisilicon: " Julia Lawall
2017-08-08 15:08 ` [PATCH 2/9 v2] thermal: qoriq: " Julia Lawall
2017-08-08 15:08 ` [PATCH 3/9 v2] thermal: rcar_gen3_thermal: " Julia Lawall
2017-08-08 15:08 ` [PATCH 4/9 v2] thermal: zx2967: " Julia Lawall
2017-08-08 15:08 ` [PATCH 5/9 v2] thermal: exynos: " Julia Lawall
2017-08-08 15:09 ` [PATCH 7/9 v2] thermal: bcm2835: " Julia Lawall
2017-08-08 19:58   ` Stefan Wahren
2017-08-11  3:36 ` [PATCH 0/9 v2] " Zhang Rui
2017-08-11  5:17   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox