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] [day] [month] [year] [list]
Date:   Tue, 30 Oct 2018 17:22:22 +0100
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Julia Lawall <Julia.Lawall@...6.fr>,
        Markus Mayer <mmayer@...adcom.com>
Cc:     kernel-janitors@...r.kernel.org,
        bcm-kernel-feedback-list@...adcom.com,
        Zhang Rui <rui.zhang@...el.com>,
        Eduardo Valentin <edubezval@...il.com>,
        Brian Norris <computersforpeace@...il.com>,
        Gregory Fong <gregory.0xf0@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] thermal: broadcom: constify
 thermal_zone_of_device_ops structure

On 30/10/2018 16:15, Julia Lawall wrote:
> The thermal_zone_of_device_ops structure can be const as it is only
> passed as the last argument of thermal_zone_of_sensor_register
> and the corresponding parameter is declared as const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>

Reviewed-by: Daniel Lezcano <daniel.lezcano@...aro.org>

> ---
> 
> Unrelated to this change, is there a reason not to use
> devm_thermal_zone_of_sensor_register?

Agree, it would make sense to use the devm* version.

>  drivers/thermal/broadcom/brcmstb_thermal.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -u -p a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c
> --- a/drivers/thermal/broadcom/brcmstb_thermal.c
> +++ b/drivers/thermal/broadcom/brcmstb_thermal.c
> @@ -299,7 +299,7 @@ static int brcmstb_set_trips(void *data,
>  	return 0;
>  }
>  
> -static struct thermal_zone_of_device_ops of_ops = {
> +static const struct thermal_zone_of_device_ops of_ops = {
>  	.get_temp	= brcmstb_get_temp,
>  	.set_trips	= brcmstb_set_trips,
>  };
> 


-- 
 <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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ