LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()
@ 2019-05-24 20:20 Kees Cook
  2019-05-27  4:50 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2019-05-24 20:20 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel, netdev

Building with Clang reports the redundant use of MODULE_DEVICE_TABLE():

drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table'
MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
^
./include/linux/module.h:229:21: note: expanded from macro 'MODULE_DEVICE_TABLE'
extern typeof(name) __mod_##type##__##name##_device_table               \
                    ^
<scratch space>:90:1: note: expanded from here
__mod_eisa__de4x5_eisa_ids_device_table
^
drivers/net/ethernet/dec/tulip/de4x5.c:2100:1: note: previous definition is here
MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
^
./include/linux/module.h:229:21: note: expanded from macro 'MODULE_DEVICE_TABLE'
extern typeof(name) __mod_##type##__##name##_device_table               \
                    ^
<scratch space>:85:1: note: expanded from here
__mod_eisa__de4x5_eisa_ids_device_table
^

This drops the one further from the table definition to match the common
use of MODULE_DEVICE_TABLE().

Fixes: 07563c711fbc ("EISA bus MODALIAS attributes support")
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/net/ethernet/dec/tulip/de4x5.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index 66535d1653f6..f16853c3c851 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -2107,7 +2107,6 @@ static struct eisa_driver de4x5_eisa_driver = {
 		.remove  = de4x5_eisa_remove,
         }
 };
-MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
 #endif
 
 #ifdef CONFIG_PCI
-- 
2.17.1


-- 
Kees Cook

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

* Re: [PATCH] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()
  2019-05-24 20:20 [PATCH] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE() Kees Cook
@ 2019-05-27  4:50 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-05-27  4:50 UTC (permalink / raw)
  To: keescook; +Cc: linux-kernel, netdev

From: Kees Cook <keescook@chromium.org>
Date: Fri, 24 May 2019 13:20:19 -0700

> Building with Clang reports the redundant use of MODULE_DEVICE_TABLE():
> 
> drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table'
> MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
> ^
> ./include/linux/module.h:229:21: note: expanded from macro 'MODULE_DEVICE_TABLE'
> extern typeof(name) __mod_##type##__##name##_device_table               \
>                     ^
> <scratch space>:90:1: note: expanded from here
> __mod_eisa__de4x5_eisa_ids_device_table
> ^
> drivers/net/ethernet/dec/tulip/de4x5.c:2100:1: note: previous definition is here
> MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
> ^
> ./include/linux/module.h:229:21: note: expanded from macro 'MODULE_DEVICE_TABLE'
> extern typeof(name) __mod_##type##__##name##_device_table               \
>                     ^
> <scratch space>:85:1: note: expanded from here
> __mod_eisa__de4x5_eisa_ids_device_table
> ^
> 
> This drops the one further from the table definition to match the common
> use of MODULE_DEVICE_TABLE().
> 
> Fixes: 07563c711fbc ("EISA bus MODALIAS attributes support")
> Signed-off-by: Kees Cook <keescook@chromium.org>

Applied.

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

end of thread, other threads:[~2019-05-27  4:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 20:20 [PATCH] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE() Kees Cook
2019-05-27  4:50 ` 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).