LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE()
@ 2015-01-29  1:36 Behan Webster
  2015-01-29  6:42 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Behan Webster @ 2015-01-29  1:36 UTC (permalink / raw)
  To: sathya.perla
  Cc: behanw, ajit.khaparde, linux-kernel, netdev, subbu.seetharaman,
	Arnd Bergmann

Missing MODULE_DEVICE_TABLE for pci ids from benet driver found by clang.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/emulex/benet/be_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index d48806b..709400a 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -26,7 +26,6 @@
 #include <net/vxlan.h>
 
 MODULE_VERSION(DRV_VER);
-MODULE_DEVICE_TABLE(pci, be_dev_ids);
 MODULE_DESCRIPTION(DRV_DESC " " DRV_VER);
 MODULE_AUTHOR("Emulex Corporation");
 MODULE_LICENSE("GPL");
-- 
1.9.1


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

* Re: [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE()
  2015-01-29  1:36 [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE() Behan Webster
@ 2015-01-29  6:42 ` David Miller
  2015-01-29  9:10   ` Arnd Bergmann
  2015-01-29 18:25   ` Behan Webster
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2015-01-29  6:42 UTC (permalink / raw)
  To: behanw
  Cc: sathya.perla, ajit.khaparde, linux-kernel, netdev,
	subbu.seetharaman, arnd

From: Behan Webster <behanw@converseincode.com>
Date: Wed, 28 Jan 2015 17:36:14 -0800

> Missing MODULE_DEVICE_TABLE for pci ids from benet driver found by clang.
> 
> Signed-off-by: Behan Webster <behanw@converseincode.com>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>

Why are you removing the device table?

Second of all, your Subject needs to be adjusted, using "net" and
"LLVMLinux" in your subsystem prefix is not appropriate.  Simply
"be2net: ", the name of this driver, is sufficient.


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

* Re: [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE()
  2015-01-29  6:42 ` David Miller
@ 2015-01-29  9:10   ` Arnd Bergmann
  2015-01-29 11:29     ` Måns Rullgård
  2015-01-29 18:21     ` Behan Webster
  2015-01-29 18:25   ` Behan Webster
  1 sibling, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-29  9:10 UTC (permalink / raw)
  To: David Miller
  Cc: behanw, sathya.perla, ajit.khaparde, linux-kernel, netdev,
	subbu.seetharaman

On Wednesday 28 January 2015 22:42:28 David Miller wrote:
> From: Behan Webster <behanw@converseincode.com>
> Date: Wed, 28 Jan 2015 17:36:14 -0800
> 
> > Missing MODULE_DEVICE_TABLE for pci ids from benet driver found by clang.
> > 
> > Signed-off-by: Behan Webster <behanw@converseincode.com>
> > Suggested-by: Arnd Bergmann <arnd@arndb.de>
> 
> Why are you removing the device table?

Behan took a patch that I did earlier and split it up to add descriptions.
The patch is correct, but he either misunderstood or misexpressed the
intention.

This driver has two identical lines that both say 

MODULE_DEVICE_TABLE(pci, be_dev_ids);

I don't remember the exact symptom, but llvm/clang trips over this, while gcc
silently ignores the second one.

	Arnd

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

* Re: [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE()
  2015-01-29  9:10   ` Arnd Bergmann
@ 2015-01-29 11:29     ` Måns Rullgård
  2015-01-29 18:21     ` Behan Webster
  1 sibling, 0 replies; 6+ messages in thread
From: Måns Rullgård @ 2015-01-29 11:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Miller, behanw, sathya.perla, ajit.khaparde, linux-kernel,
	netdev, subbu.seetharaman

Arnd Bergmann <arnd@arndb.de> writes:

> On Wednesday 28 January 2015 22:42:28 David Miller wrote:
>> From: Behan Webster <behanw@converseincode.com>
>> Date: Wed, 28 Jan 2015 17:36:14 -0800
>> 
>> > Missing MODULE_DEVICE_TABLE for pci ids from benet driver found by clang.
>> > 
>> > Signed-off-by: Behan Webster <behanw@converseincode.com>
>> > Suggested-by: Arnd Bergmann <arnd@arndb.de>
>> 
>> Why are you removing the device table?
>
> Behan took a patch that I did earlier and split it up to add descriptions.
> The patch is correct, but he either misunderstood or misexpressed the
> intention.
>
> This driver has two identical lines that both say 
>
> MODULE_DEVICE_TABLE(pci, be_dev_ids);
>
> I don't remember the exact symptom, but llvm/clang trips over this, while gcc
> silently ignores the second one.

GCC is probably being "helpful" and allowing multiple identical
definitions even though the C spec does not.  Obviously all but one
should go away.  No need to mention llvm, IMO.

-- 
Måns Rullgård
mans@mansr.com

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

* Re: [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE()
  2015-01-29  9:10   ` Arnd Bergmann
  2015-01-29 11:29     ` Måns Rullgård
@ 2015-01-29 18:21     ` Behan Webster
  1 sibling, 0 replies; 6+ messages in thread
From: Behan Webster @ 2015-01-29 18:21 UTC (permalink / raw)
  To: Arnd Bergmann, David Miller
  Cc: sathya.perla, ajit.khaparde, linux-kernel, netdev, subbu.seetharaman

On 01/29/15 01:10, Arnd Bergmann wrote:
> On Wednesday 28 January 2015 22:42:28 David Miller wrote:
>> From: Behan Webster <behanw@converseincode.com>
>> Date: Wed, 28 Jan 2015 17:36:14 -0800
>>
>>> Missing MODULE_DEVICE_TABLE for pci ids from benet driver found by clang.
>>>
>>> Signed-off-by: Behan Webster <behanw@converseincode.com>
>>> Suggested-by: Arnd Bergmann <arnd@arndb.de>
>> Why are you removing the device table?
> Behan took a patch that I did earlier and split it up to add descriptions.
> The patch is correct, but he either misunderstood or misexpressed the
> intention.
I was tired and rushed this submission in my preparation for FOSDEM.
Apologies to all.

I neglected to write the commit log when I first split the patch, and
didn't look hard enough this time.

> This driver has two identical lines that both say 
>
> MODULE_DEVICE_TABLE(pci, be_dev_ids);
This is indeed the case.

> I don't remember the exact symptom, but llvm/clang trips over this, while gcc
> silently ignores the second one.
It claims that it is defined more than once.

Behan

-- 
Behan Webster
behanw@converseincode.com


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

* Re: [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE()
  2015-01-29  6:42 ` David Miller
  2015-01-29  9:10   ` Arnd Bergmann
@ 2015-01-29 18:25   ` Behan Webster
  1 sibling, 0 replies; 6+ messages in thread
From: Behan Webster @ 2015-01-29 18:25 UTC (permalink / raw)
  To: David Miller
  Cc: sathya.perla, ajit.khaparde, linux-kernel, netdev,
	subbu.seetharaman, arnd

On 01/28/15 22:42, David Miller wrote:
> From: Behan Webster <behanw@converseincode.com>
> Date: Wed, 28 Jan 2015 17:36:14 -0800
>
>> Missing MODULE_DEVICE_TABLE for pci ids from benet driver found by clang.
>>
>> Signed-off-by: Behan Webster <behanw@converseincode.com>
>> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Why are you removing the device table?
It is defined more than once; removing the duplicate (as Arnd
indicated). My commit message was just completely wrong. Brain fart. Sorry.

> Second of all, your Subject needs to be adjusted, using "net" and
> "LLVMLinux" in your subsystem prefix is not appropriate.  Simply
> "be2net: ", the name of this driver, is sufficient.
Will fix.

I've been in the habit of labelling the patches which go through the
LLVMLinux project like this so they are trivially identifiable in the
subject on lkml for reviewers and in the git log as being patches which
exist because of clang. If it's annoying I certainly don't need to do it.

Behan

-- 
Behan Webster
behanw@converseincode.com


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

end of thread, other threads:[~2015-01-29 18:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  1:36 [PATCH] net, ethernet, LLVMLinux: Add missing MODULE_DEVICE_TABLE() Behan Webster
2015-01-29  6:42 ` David Miller
2015-01-29  9:10   ` Arnd Bergmann
2015-01-29 11:29     ` Måns Rullgård
2015-01-29 18:21     ` Behan Webster
2015-01-29 18:25   ` Behan Webster

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