netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] net: defxx: constify eisa_device_id
@ 2017-08-19  6:53 Arvind Yadav
  2017-08-19 12:06 ` Maciej W. Rozycki
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-19  6:53 UTC (permalink / raw)
  To: davem, macro; +Cc: linux-kernel, netdev

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

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/net/fddi/defxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index f4a816c..61fceee 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -3767,7 +3767,7 @@ static void dfx_pci_unregister(struct pci_dev *pdev)
 #endif /* CONFIG_PCI */
 
 #ifdef CONFIG_EISA
-static struct eisa_device_id dfx_eisa_table[] = {
+static const struct eisa_device_id dfx_eisa_table[] = {
         { "DEC3001", DEFEA_PROD_ID_1 },
         { "DEC3002", DEFEA_PROD_ID_2 },
         { "DEC3003", DEFEA_PROD_ID_3 },
-- 
2.7.4

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

* Re: [PATCH 5/5] net: defxx: constify eisa_device_id
  2017-08-19  6:53 [PATCH 5/5] net: defxx: constify eisa_device_id Arvind Yadav
@ 2017-08-19 12:06 ` Maciej W. Rozycki
  0 siblings, 0 replies; 2+ messages in thread
From: Maciej W. Rozycki @ 2017-08-19 12:06 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: David S. Miller, linux-kernel, netdev

On Sat, 19 Aug 2017, Arvind Yadav wrote:

> eisa_device_id are not supposed to change at runtime. All functions
> working with eisa_device_id provided by <linux/eisa.h> work with
> const eisa_device_id. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---

Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>

  Maciej

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

end of thread, other threads:[~2017-08-19 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19  6:53 [PATCH 5/5] net: defxx: constify eisa_device_id Arvind Yadav
2017-08-19 12:06 ` Maciej W. Rozycki

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