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, 28 Jul 2021 11:04:25 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     Wim Van Sebroeck <wim@...ux-watchdog.org>,
        linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] watchdog: tqmx86: Constify static struct watchdog_ops

On Wed, Jul 28, 2021 at 12:30:41AM +0200, Rikard Falkeborn wrote:
> The struct tqmx86_wdt_ops is only assigned to the ops pointer in the
> watchdog_device struct, which is a pointer to const struct watchdog_ops.
> Make it const to allow the compiler to put it in read-only memory.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  drivers/watchdog/tqmx86_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/tqmx86_wdt.c b/drivers/watchdog/tqmx86_wdt.c
> index 72d0b0adde38..83860e94ce9d 100644
> --- a/drivers/watchdog/tqmx86_wdt.c
> +++ b/drivers/watchdog/tqmx86_wdt.c
> @@ -62,7 +62,7 @@ static const struct watchdog_info tqmx86_wdt_info = {
>  	.identity	= "TQMx86 Watchdog",
>  };
>  
> -static struct watchdog_ops tqmx86_wdt_ops = {
> +static const struct watchdog_ops tqmx86_wdt_ops = {
>  	.owner		= THIS_MODULE,
>  	.start		= tqmx86_wdt_start,
>  	.set_timeout	= tqmx86_wdt_set_timeout,
> -- 
> 2.32.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ