From: Guenter Roeck <linux@roeck-us.net>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: zwanem@gmail.com, wim@iguana.be, linux-kernel@vger.kernel.org,
linux-watchdog@vger.kernel.org
Subject: Re: watchdog: sc1200: constify pnp_device_id
Date: Tue, 29 Aug 2017 20:22:54 -0700 [thread overview]
Message-ID: <20170830032254.GA10447@roeck-us.net> (raw)
In-Reply-To: <aee38052d11c39f1f6957bfe9757665a0bd9976d.1502859040.git.arvind.yadav.cs@gmail.com>
On Wed, Aug 16, 2017 at 10:27:03AM +0530, Arvind Yadav wrote:
> pnp_device_id are not supposed to change at runtime. All functions
> working with pnp_device_id provided by <linux/pnp.h> work with
> const pnp_device_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/sc1200wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c
> index b34d3d5..8e4e2fc 100644
> --- a/drivers/watchdog/sc1200wdt.c
> +++ b/drivers/watchdog/sc1200wdt.c
> @@ -342,7 +342,7 @@ static int __init sc1200wdt_probe(void)
>
> #if defined CONFIG_PNP
>
> -static struct pnp_device_id scl200wdt_pnp_devices[] = {
> +static const struct pnp_device_id scl200wdt_pnp_devices[] = {
> /* National Semiconductor PC87307/PC97307 watchdog component */
> {.id = "NSC0800", .driver_data = 0},
> {.id = ""},
next prev parent reply other threads:[~2017-08-30 3:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 4:54 [PATCH] PNP: ide: constify pnp_device_id Arvind Yadav
2017-08-16 4:55 ` [PATCH] net: 3c509: " Arvind Yadav
2017-08-16 18:26 ` David Miller
2017-08-16 4:57 ` [PATCH] watchdog: sc1200: " Arvind Yadav
2017-08-30 3:22 ` Guenter Roeck [this message]
2017-08-16 4:58 ` [PATCH] scsi: ncr5380: " Arvind Yadav
2017-08-16 7:17 ` Finn Thain
2017-08-17 0:54 ` Martin K. Petersen
2017-08-16 4:59 ` [PATCH] scsi: aha1542: " Arvind Yadav
2017-08-16 18:10 ` [PATCH] PNP: ide: " David Miller
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=20170830032254.GA10447@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arvind.yadav.cs@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
--cc=zwanem@gmail.com \
/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