[PATCH] net: ibm: ibmveth: constify vio_device_id

Subsystems: ibm power virtual ethernet device driver, linux for powerpc (32-bit and 64-bit), networking drivers, the rest

STALE3352d

4 messages, 2 authors, 2017-08-17 · open the first message on its own page

[PATCH] net: ibm: ibmveth: constify vio_device_id

From: Arvind Yadav <hidden>
Date: 2017-08-17 13:23:07

vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by <asm/vio.h> work with
const vio_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <redacted>
---
 drivers/net/ethernet/ibm/ibmveth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index d17c2b0..f210398 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1897,7 +1897,7 @@ static int ibmveth_resume(struct device *dev)
 	return 0;
 }
 
-static struct vio_device_id ibmveth_device_table[] = {
+static const struct vio_device_id ibmveth_device_table[] = {
 	{ "network", "IBM,l-lan"},
 	{ "", "" }
 };
-- 
2.7.4

[PATCH] net: ibm: ibmvnic: constify vio_device_id

From: Arvind Yadav <hidden>
Date: 2017-08-17 13:23:14

vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by <asm/vio.h> work with
const vio_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <redacted>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index a3e6946..d5372b5 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -3859,7 +3859,7 @@ static int ibmvnic_resume(struct device *dev)
 	return 0;
 }
 
-static struct vio_device_id ibmvnic_device_table[] = {
+static const struct vio_device_id ibmvnic_device_table[] = {
 	{"network", "IBM,vnic"},
 	{"", "" }
 };
-- 
2.7.4

Re: [PATCH] net: ibm: ibmveth: constify vio_device_id

From: David Miller <davem@davemloft.net>
Date: 2017-08-17 17:18:07

From: Arvind Yadav <redacted>
Date: Thu, 17 Aug 2017 18:52:53 +0530
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by <asm/vio.h> work with
const vio_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <redacted>
Applied.

Re: [PATCH] net: ibm: ibmvnic: constify vio_device_id

From: David Miller <davem@davemloft.net>
Date: 2017-08-17 17:18:12

From: Arvind Yadav <redacted>
Date: Thu, 17 Aug 2017 18:52:54 +0530
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by <asm/vio.h> work with
const vio_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help