* [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops
@ 2021-09-20 20:38 Rikard Falkeborn
2021-09-22 11:01 ` Shenhar, Talel
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rikard Falkeborn @ 2021-09-20 20:38 UTC (permalink / raw)
To: Talel Shenhar, Daniel Lezcano
Cc: Zhang Rui, Amit Kucheria, linux-pm, linux-kernel, Rikard Falkeborn
The only usage of thermal_mmio_ops is to pass its address to
devm_thermal_zone_of_sensor_register(), which has a pointer to const
struct thermal_zone_of_device_ops as argument. Make it const to allow
the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/thermal/thermal_mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
index ded1dd0d4ef7..360b0dfdc3b0 100644
--- a/drivers/thermal/thermal_mmio.c
+++ b/drivers/thermal/thermal_mmio.c
@@ -34,7 +34,7 @@ static int thermal_mmio_get_temperature(void *private, int *temp)
return 0;
}
-static struct thermal_zone_of_device_ops thermal_mmio_ops = {
+static const struct thermal_zone_of_device_ops thermal_mmio_ops = {
.get_temp = thermal_mmio_get_temperature,
};
--
2.33.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: thermal: thermal_mmio: Constify static struct thermal_mmio_ops
2021-09-20 20:38 [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops Rikard Falkeborn
@ 2021-09-22 11:01 ` Shenhar, Talel
2021-10-05 14:36 ` [PATCH] " Rafael J. Wysocki
2021-10-18 11:46 ` [thermal: thermal/next] thermal/drivers/thermal_mmio: " thermal-bot for Rikard Falkeborn
2 siblings, 0 replies; 5+ messages in thread
From: Shenhar, Talel @ 2021-09-22 11:01 UTC (permalink / raw)
To: Rikard Falkeborn, Daniel Lezcano
Cc: Zhang Rui, Amit Kucheria, Ronen Krupnik, linux-kernel, linux-pm
The only usage of thermal_mmio_ops is to pass its address to
> devm_thermal_zone_of_sensor_register(), which has a pointer to const
> struct thermal_zone_of_device_ops as argument. Make it const to allow
> the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Talel Shenhar <talel@amazon.com>
> ---
> drivers/thermal/thermal_mmio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
> index ded1dd0d4ef7..360b0dfdc3b0 100644
> --- a/drivers/thermal/thermal_mmio.c
> +++ b/drivers/thermal/thermal_mmio.c
> @@ -34,7 +34,7 @@ static int thermal_mmio_get_temperature(void *private, int *temp)
> return 0;
> }
>
> -static struct thermal_zone_of_device_ops thermal_mmio_ops = {
> +static const struct thermal_zone_of_device_ops thermal_mmio_ops = {
> .get_temp = thermal_mmio_get_temperature,
> };
>
> --
> 2.33.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops
2021-09-20 20:38 [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops Rikard Falkeborn
2021-09-22 11:01 ` Shenhar, Talel
@ 2021-10-05 14:36 ` Rafael J. Wysocki
2021-10-05 16:51 ` Daniel Lezcano
2021-10-18 11:46 ` [thermal: thermal/next] thermal/drivers/thermal_mmio: " thermal-bot for Rikard Falkeborn
2 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2021-10-05 14:36 UTC (permalink / raw)
To: Rikard Falkeborn, Daniel Lezcano
Cc: Talel Shenhar, Zhang Rui, Amit Kucheria, Linux PM,
Linux Kernel Mailing List
On Tue, Sep 21, 2021 at 3:55 AM Rikard Falkeborn
<rikard.falkeborn@gmail.com> wrote:
>
> The only usage of thermal_mmio_ops is to pass its address to
> devm_thermal_zone_of_sensor_register(), which has a pointer to const
> struct thermal_zone_of_device_ops as argument. Make it const to allow
> the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> drivers/thermal/thermal_mmio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
> index ded1dd0d4ef7..360b0dfdc3b0 100644
> --- a/drivers/thermal/thermal_mmio.c
> +++ b/drivers/thermal/thermal_mmio.c
> @@ -34,7 +34,7 @@ static int thermal_mmio_get_temperature(void *private, int *temp)
> return 0;
> }
>
> -static struct thermal_zone_of_device_ops thermal_mmio_ops = {
> +static const struct thermal_zone_of_device_ops thermal_mmio_ops = {
> .get_temp = thermal_mmio_get_temperature,
> };
>
> --
I'm not sure what happened to this patch.
Daniel, are you going to pick it up?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops
2021-10-05 14:36 ` [PATCH] " Rafael J. Wysocki
@ 2021-10-05 16:51 ` Daniel Lezcano
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Lezcano @ 2021-10-05 16:51 UTC (permalink / raw)
To: Rafael J. Wysocki, Rikard Falkeborn
Cc: Talel Shenhar, Zhang Rui, Amit Kucheria, Linux PM,
Linux Kernel Mailing List
On 05/10/2021 16:36, Rafael J. Wysocki wrote:
> On Tue, Sep 21, 2021 at 3:55 AM Rikard Falkeborn
> <rikard.falkeborn@gmail.com> wrote:
>>
>> The only usage of thermal_mmio_ops is to pass its address to
>> devm_thermal_zone_of_sensor_register(), which has a pointer to const
>> struct thermal_zone_of_device_ops as argument. Make it const to allow
>> the compiler to put it in read-only memory.
>>
>> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
>> ---
>> drivers/thermal/thermal_mmio.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
>> index ded1dd0d4ef7..360b0dfdc3b0 100644
>> --- a/drivers/thermal/thermal_mmio.c
>> +++ b/drivers/thermal/thermal_mmio.c
>> @@ -34,7 +34,7 @@ static int thermal_mmio_get_temperature(void *private, int *temp)
>> return 0;
>> }
>>
>> -static struct thermal_zone_of_device_ops thermal_mmio_ops = {
>> +static const struct thermal_zone_of_device_ops thermal_mmio_ops = {
>> .get_temp = thermal_mmio_get_temperature,
>> };
>>
>> --
>
> I'm not sure what happened to this patch.
>
> Daniel, are you going to pick it up?
Yes.
I had picked also the intel ones but I'll drop them.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [thermal: thermal/next] thermal/drivers/thermal_mmio: Constify static struct thermal_mmio_ops
2021-09-20 20:38 [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops Rikard Falkeborn
2021-09-22 11:01 ` Shenhar, Talel
2021-10-05 14:36 ` [PATCH] " Rafael J. Wysocki
@ 2021-10-18 11:46 ` thermal-bot for Rikard Falkeborn
2 siblings, 0 replies; 5+ messages in thread
From: thermal-bot for Rikard Falkeborn @ 2021-10-18 11:46 UTC (permalink / raw)
To: linux-pm
Cc: Rikard Falkeborn, Talel Shenhar, Daniel Lezcano, rui.zhang, amitk
The following commit has been merged into the thermal/next branch of thermal:
Commit-ID: 69c560d2eb3cff7ebe876cd224a3dc05852990b5
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//69c560d2eb3cff7ebe876cd224a3dc05852990b5
Author: Rikard Falkeborn <rikard.falkeborn@gmail.com>
AuthorDate: Mon, 20 Sep 2021 22:38:49 +02:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 07 Oct 2021 15:18:31 +02:00
thermal/drivers/thermal_mmio: Constify static struct thermal_mmio_ops
The only usage of thermal_mmio_ops is to pass its address to
devm_thermal_zone_of_sensor_register(), which has a pointer to const
struct thermal_zone_of_device_ops as argument. Make it const to allow
the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Talel Shenhar <talel@amazon.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210920203849.32136-1-rikard.falkeborn@gmail.com
---
drivers/thermal/thermal_mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c
index ded1dd0..360b0df 100644
--- a/drivers/thermal/thermal_mmio.c
+++ b/drivers/thermal/thermal_mmio.c
@@ -34,7 +34,7 @@ static int thermal_mmio_get_temperature(void *private, int *temp)
return 0;
}
-static struct thermal_zone_of_device_ops thermal_mmio_ops = {
+static const struct thermal_zone_of_device_ops thermal_mmio_ops = {
.get_temp = thermal_mmio_get_temperature,
};
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-18 11:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 20:38 [PATCH] thermal: thermal_mmio: Constify static struct thermal_mmio_ops Rikard Falkeborn
2021-09-22 11:01 ` Shenhar, Talel
2021-10-05 14:36 ` [PATCH] " Rafael J. Wysocki
2021-10-05 16:51 ` Daniel Lezcano
2021-10-18 11:46 ` [thermal: thermal/next] thermal/drivers/thermal_mmio: " thermal-bot for Rikard Falkeborn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.