linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] watchdog: tqmx86: Constify static struct watchdog_ops
Date: Wed, 28 Jul 2021 11:04:25 -0700	[thread overview]
Message-ID: <20210728180425.GB1663715@roeck-us.net> (raw)
In-Reply-To: <20210727223042.48150-3-rikard.falkeborn@gmail.com>

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@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-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
> 

  reply	other threads:[~2021-07-28 18:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 22:30 [PATCH 0/3] drivers/watchdog: Constify static struct watchdog_ops Rikard Falkeborn
2021-07-27 22:30 ` [PATCH 1/3] watchdog: sl28cpld_wdt: " Rikard Falkeborn
2021-07-28 18:04   ` Guenter Roeck
2021-07-27 22:30 ` [PATCH 2/3] watchdog: tqmx86: " Rikard Falkeborn
2021-07-28 18:04   ` Guenter Roeck [this message]
2021-07-27 22:30 ` [PATCH 3/3] watchdog: mpc8xxx_wdt: " Rikard Falkeborn
2021-07-28 18:04   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210728180425.GB1663715@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=rikard.falkeborn@gmail.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).