lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Sep 2021 14:01:26 +0300
From:   "Shenhar, Talel" <talel@...zon.com>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>
CC:     Zhang Rui <rui.zhang@...el.com>, Amit Kucheria <amitk@...nel.org>,
        Ronen Krupnik <ronenk@...zon.com>,
        <linux-kernel@...r.kernel.org>, <linux-pm@...r.kernel.org>
Subject: Re: thermal: 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@...il.com>
Acked-by: Talel Shenhar <talel@...zon.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ