linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ibm: ibmveth: constify vio_device_id
@ 2017-08-17 13:22 Arvind Yadav
  2017-08-17 13:22 ` [PATCH] net: ibm: ibmvnic: " Arvind Yadav
  2017-08-17 17:18 ` [PATCH] net: ibm: ibmveth: " David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Arvind Yadav @ 2017-08-17 13:22 UTC (permalink / raw)
  To: tlfalcon, benh, jallen, mpe, davem; +Cc: linux-kernel, linuxppc-dev, netdev

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] net: ibm: ibmvnic: constify vio_device_id
  2017-08-17 13:22 [PATCH] net: ibm: ibmveth: constify vio_device_id Arvind Yadav
@ 2017-08-17 13:22 ` Arvind Yadav
  2017-08-17 17:18   ` David Miller
  2017-08-17 17:18 ` [PATCH] net: ibm: ibmveth: " David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Arvind Yadav @ 2017-08-17 13:22 UTC (permalink / raw)
  To: tlfalcon, benh, jallen, mpe, davem; +Cc: linux-kernel, linuxppc-dev, netdev

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ibm: ibmveth: constify vio_device_id
  2017-08-17 13:22 [PATCH] net: ibm: ibmveth: constify vio_device_id Arvind Yadav
  2017-08-17 13:22 ` [PATCH] net: ibm: ibmvnic: " Arvind Yadav
@ 2017-08-17 17:18 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-08-17 17:18 UTC (permalink / raw)
  To: arvind.yadav.cs
  Cc: tlfalcon, benh, jallen, mpe, linux-kernel, linuxppc-dev, netdev

From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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 <arvind.yadav.cs@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ibm: ibmvnic: constify vio_device_id
  2017-08-17 13:22 ` [PATCH] net: ibm: ibmvnic: " Arvind Yadav
@ 2017-08-17 17:18   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-08-17 17:18 UTC (permalink / raw)
  To: arvind.yadav.cs
  Cc: tlfalcon, benh, jallen, mpe, linux-kernel, linuxppc-dev, netdev

From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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 <arvind.yadav.cs@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-17 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 13:22 [PATCH] net: ibm: ibmveth: constify vio_device_id Arvind Yadav
2017-08-17 13:22 ` [PATCH] net: ibm: ibmvnic: " Arvind Yadav
2017-08-17 17:18   ` David Miller
2017-08-17 17:18 ` [PATCH] net: ibm: ibmveth: " David Miller

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).