* [PATCH] net: 3c509: constify pnp_device_id
2017-08-16 4:54 [PATCH] PNP: ide: constify pnp_device_id Arvind Yadav
@ 2017-08-16 4:55 ` Arvind Yadav
2017-08-16 18:26 ` David Miller
2017-08-16 4:57 ` [PATCH] watchdog: sc1200: " Arvind Yadav
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Arvind Yadav @ 2017-08-16 4:55 UTC (permalink / raw)
To: davem, jarod, dhowells; +Cc: linux-kernel, netdev
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>
---
drivers/net/ethernet/3com/3c509.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index f66c971..077d01d 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -392,7 +392,7 @@ static struct isa_driver el3_isa_driver = {
static int isa_registered;
#ifdef CONFIG_PNP
-static struct pnp_device_id el3_pnp_ids[] = {
+static const struct pnp_device_id el3_pnp_ids[] = {
{ .id = "TCM5090" }, /* 3Com Etherlink III (TP) */
{ .id = "TCM5091" }, /* 3Com Etherlink III */
{ .id = "TCM5094" }, /* 3Com Etherlink III (combo) */
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH] watchdog: sc1200: constify pnp_device_id
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 4:57 ` Arvind Yadav
2017-08-30 3:22 ` Guenter Roeck
2017-08-16 4:58 ` [PATCH] scsi: ncr5380: " Arvind Yadav
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Arvind Yadav @ 2017-08-16 4:57 UTC (permalink / raw)
To: zwanem, wim, linux; +Cc: linux-kernel, linux-watchdog
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>
---
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 = ""},
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: watchdog: sc1200: constify pnp_device_id
2017-08-16 4:57 ` [PATCH] watchdog: sc1200: " Arvind Yadav
@ 2017-08-30 3:22 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2017-08-30 3:22 UTC (permalink / raw)
To: Arvind Yadav; +Cc: zwanem, wim, linux-kernel, linux-watchdog
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 = ""},
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] scsi: ncr5380: constify pnp_device_id
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 4:57 ` [PATCH] watchdog: sc1200: " Arvind Yadav
@ 2017-08-16 4:58 ` 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
4 siblings, 2 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-08-16 4:58 UTC (permalink / raw)
To: fthain, schmitzmic, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi
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>
---
drivers/scsi/g_NCR5380.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index c34fc91..1968d81 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -703,7 +703,7 @@ static struct isa_driver generic_NCR5380_isa_driver = {
};
#ifdef CONFIG_PNP
-static struct pnp_device_id generic_NCR5380_pnp_ids[] = {
+static const struct pnp_device_id generic_NCR5380_pnp_ids[] = {
{ .id = "DTC436e", .driver_data = BOARD_DTC3181E },
{ .id = "" }
};
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] scsi: ncr5380: constify pnp_device_id
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
1 sibling, 0 replies; 10+ messages in thread
From: Finn Thain @ 2017-08-16 7:17 UTC (permalink / raw)
To: Arvind Yadav; +Cc: schmitzmic, jejb, martin.petersen, linux-kernel, linux-scsi
On Wed, 16 Aug 2017, 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>
Acked-by: Finn Thain <fthain@telegraphics.com.au>
> ---
> drivers/scsi/g_NCR5380.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
> index c34fc91..1968d81 100644
> --- a/drivers/scsi/g_NCR5380.c
> +++ b/drivers/scsi/g_NCR5380.c
> @@ -703,7 +703,7 @@ static struct isa_driver generic_NCR5380_isa_driver = {
> };
>
> #ifdef CONFIG_PNP
> -static struct pnp_device_id generic_NCR5380_pnp_ids[] = {
> +static const struct pnp_device_id generic_NCR5380_pnp_ids[] = {
> { .id = "DTC436e", .driver_data = BOARD_DTC3181E },
> { .id = "" }
> };
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] scsi: ncr5380: constify pnp_device_id
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
1 sibling, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2017-08-17 0:54 UTC (permalink / raw)
To: Arvind Yadav
Cc: fthain, schmitzmic, jejb, martin.petersen, linux-kernel,
linux-scsi
Arvind,
> 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.
Applied to 4.14/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] scsi: aha1542: constify pnp_device_id
2017-08-16 4:54 [PATCH] PNP: ide: constify pnp_device_id Arvind Yadav
` (2 preceding siblings ...)
2017-08-16 4:58 ` [PATCH] scsi: ncr5380: " Arvind Yadav
@ 2017-08-16 4:59 ` Arvind Yadav
2017-08-16 18:10 ` [PATCH] PNP: ide: " David Miller
4 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-08-16 4:59 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi
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>
---
drivers/scsi/aha1542.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index a23cc9a..1242179 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -986,7 +986,7 @@ static struct isa_driver aha1542_isa_driver = {
static int isa_registered;
#ifdef CONFIG_PNP
-static struct pnp_device_id aha1542_pnp_ids[] = {
+static const struct pnp_device_id aha1542_pnp_ids[] = {
{ .id = "ADP1542" },
{ .id = "" }
};
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] PNP: ide: constify pnp_device_id
2017-08-16 4:54 [PATCH] PNP: ide: constify pnp_device_id Arvind Yadav
` (3 preceding siblings ...)
2017-08-16 4:59 ` [PATCH] scsi: aha1542: " Arvind Yadav
@ 2017-08-16 18:10 ` David Miller
4 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2017-08-16 18:10 UTC (permalink / raw)
To: arvind.yadav.cs; +Cc: linux-kernel, linux-ide
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Wed, 16 Aug 2017 10:24:32 +0530
> 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>
Applied.
^ permalink raw reply [flat|nested] 10+ messages in thread