linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: whci-hcd: fix compiler warning
@ 2010-12-01  4:28 Namhyung Kim
  2010-12-01 16:10 ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Namhyung Kim @ 2010-12-01  4:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

Annotate whci_hcd_id_table as '__used' to fix following warning:

  CC      drivers/usb/host/whci/hcd.o
drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 drivers/usb/host/whci/hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c
index 72b6892..9546f6c 100644
--- a/drivers/usb/host/whci/hcd.c
+++ b/drivers/usb/host/whci/hcd.c
@@ -356,7 +356,7 @@ static void __exit whci_hc_driver_exit(void)
 module_exit(whci_hc_driver_exit);
 
 /* PCI device ID's that we handle (so it gets loaded) */
-static struct pci_device_id whci_hcd_id_table[] = {
+static struct pci_device_id __used whci_hcd_id_table[] = {
 	{ PCI_DEVICE_CLASS(PCI_CLASS_WIRELESS_WHCI, ~0) },
 	{ /* empty last entry */ }
 };
-- 
1.7.0.4


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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01  4:28 [PATCH] USB: whci-hcd: fix compiler warning Namhyung Kim
@ 2010-12-01 16:10 ` Greg KH
  2010-12-01 16:49   ` Namhyung Kim
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2010-12-01 16:10 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: linux-usb, linux-kernel

On Wed, Dec 01, 2010 at 01:28:41PM +0900, Namhyung Kim wrote:
> Annotate whci_hcd_id_table as '__used' to fix following warning:
> 
>   CC      drivers/usb/host/whci/hcd.o
> drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used

Are you seeing this warning when you build the module into the kernel,
or as a module?

thanks,

greg k-h

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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01 16:10 ` Greg KH
@ 2010-12-01 16:49   ` Namhyung Kim
  2010-12-01 16:52     ` David Vrabel
  2010-12-01 17:36     ` Greg KH
  0 siblings, 2 replies; 11+ messages in thread
From: Namhyung Kim @ 2010-12-01 16:49 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb, linux-kernel

2010-12-01 (수), 08:10 -0800, Greg KH:
> On Wed, Dec 01, 2010 at 01:28:41PM +0900, Namhyung Kim wrote:
> > Annotate whci_hcd_id_table as '__used' to fix following warning:
> > 
> >   CC      drivers/usb/host/whci/hcd.o
> > drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used
> 
> Are you seeing this warning when you build the module into the kernel,
> or as a module?
> 
> thanks,
> 
> greg k-h

I saw it during allyesconfig build but not on allmodconfig.
Maybe we can wrap it up in #ifdef CONFIG_MODULES ?

Thanks.

-- 
Regards,
Namhyung Kim



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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01 16:49   ` Namhyung Kim
@ 2010-12-01 16:52     ` David Vrabel
  2010-12-01 17:02       ` Namhyung Kim
  2010-12-01 17:36     ` Greg KH
  1 sibling, 1 reply; 11+ messages in thread
From: David Vrabel @ 2010-12-01 16:52 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Greg KH, linux-usb, linux-kernel

Namhyung Kim wrote:
> 2010-12-01 (수), 08:10 -0800, Greg KH:
>> On Wed, Dec 01, 2010 at 01:28:41PM +0900, Namhyung Kim wrote:
>>> Annotate whci_hcd_id_table as '__used' to fix following warning:
>>>
>>>   CC      drivers/usb/host/whci/hcd.o
>>> drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used
>> Are you seeing this warning when you build the module into the kernel,
>> or as a module?
>>
>> thanks,
>>
>> greg k-h
> 
> I saw it during allyesconfig build but not on allmodconfig.
> Maybe we can wrap it up in #ifdef CONFIG_MODULES ?

That might be best.  Can you do the same with drivers/uwb/whc-rc.c?  It
will have the same problem.

David
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom

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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01 16:52     ` David Vrabel
@ 2010-12-01 17:02       ` Namhyung Kim
  2010-12-01 17:06         ` David Vrabel
  0 siblings, 1 reply; 11+ messages in thread
From: Namhyung Kim @ 2010-12-01 17:02 UTC (permalink / raw)
  To: David Vrabel; +Cc: Greg KH, linux-usb, linux-kernel

2010-12-01 (수), 16:52 +0000, David Vrabel:
> Namhyung Kim wrote:
> > I saw it during allyesconfig build but not on allmodconfig.
> > Maybe we can wrap it up in #ifdef CONFIG_MODULES ?
> 
> That might be best.  Can you do the same with drivers/uwb/whc-rc.c?  It
> will have the same problem.
> 
> David

No problem. Will send them soon. :)
Thanks.

-- 
Regards,
Namhyung Kim



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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01 17:02       ` Namhyung Kim
@ 2010-12-01 17:06         ` David Vrabel
  2010-12-01 17:11           ` Namhyung Kim
  0 siblings, 1 reply; 11+ messages in thread
From: David Vrabel @ 2010-12-01 17:06 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Greg KH, linux-usb, linux-kernel

Namhyung Kim wrote:
> 2010-12-01 (수), 16:52 +0000, David Vrabel:
>> Namhyung Kim wrote:
>>> I saw it during allyesconfig build but not on allmodconfig.
>>> Maybe we can wrap it up in #ifdef CONFIG_MODULES ?
>> That might be best.  Can you do the same with drivers/uwb/whc-rc.c?  It
>> will have the same problem.
>>
>> David
> 
> No problem. Will send them soon. :)

Actually CONFIG_MODULES is wrong. It needs to test if the driver has
been built as a module or not.  I think there's a __MODULE__ or MODULE
#define for this, not sure though.

David
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom

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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01 17:06         ` David Vrabel
@ 2010-12-01 17:11           ` Namhyung Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Namhyung Kim @ 2010-12-01 17:11 UTC (permalink / raw)
  To: David Vrabel; +Cc: Greg KH, linux-usb, linux-kernel

2010-12-01 (수), 17:06 +0000, David Vrabel:
> Actually CONFIG_MODULES is wrong. It needs to test if the driver has
> been built as a module or not.  I think there's a __MODULE__ or MODULE
> #define for this, not sure though.
> 
> David

Right, we use MODULE. I was just thinking about that :)

-- 
Regards,
Namhyung Kim



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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01 16:49   ` Namhyung Kim
  2010-12-01 16:52     ` David Vrabel
@ 2010-12-01 17:36     ` Greg KH
  2010-12-06 13:05       ` Namhyung Kim
  1 sibling, 1 reply; 11+ messages in thread
From: Greg KH @ 2010-12-01 17:36 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: linux-usb, linux-kernel

On Thu, Dec 02, 2010 at 01:49:11AM +0900, Namhyung Kim wrote:
> 2010-12-01 (수), 08:10 -0800, Greg KH:
> > On Wed, Dec 01, 2010 at 01:28:41PM +0900, Namhyung Kim wrote:
> > > Annotate whci_hcd_id_table as '__used' to fix following warning:
> > > 
> > >   CC      drivers/usb/host/whci/hcd.o
> > > drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used
> > 
> > Are you seeing this warning when you build the module into the kernel,
> > or as a module?
> > 
> > thanks,
> > 
> > greg k-h
> 
> I saw it during allyesconfig build but not on allmodconfig.
> Maybe we can wrap it up in #ifdef CONFIG_MODULES ?

No, don't do that, your __used is the correct thing here, I just wanted
to make sure why you were seeing this warning.

thanks,

greg k-h

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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-01 17:36     ` Greg KH
@ 2010-12-06 13:05       ` Namhyung Kim
  2010-12-06 15:56         ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Namhyung Kim @ 2010-12-06 13:05 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb, linux-kernel

2010-12-01 (수), 09:36 -0800, Greg KH:
> On Thu, Dec 02, 2010 at 01:49:11AM +0900, Namhyung Kim wrote:
> > 2010-12-01 (수), 08:10 -0800, Greg KH:
> > > On Wed, Dec 01, 2010 at 01:28:41PM +0900, Namhyung Kim wrote:
> > > > Annotate whci_hcd_id_table as '__used' to fix following warning:
> > > > 
> > > >   CC      drivers/usb/host/whci/hcd.o
> > > > drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used
> > > 
> > > Are you seeing this warning when you build the module into the kernel,
> > > or as a module?
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > I saw it during allyesconfig build but not on allmodconfig.
> > Maybe we can wrap it up in #ifdef CONFIG_MODULES ?
> 
> No, don't do that, your __used is the correct thing here, I just wanted
> to make sure why you were seeing this warning.
> 
> thanks,
> 
> greg k-h

Hi, Greg

It seems this one is not applied in your tree yet. Do you need a resend?

Thanks.


-- 
Regards,
Namhyung Kim



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

* Re: [PATCH] USB: whci-hcd: fix compiler warning
  2010-12-06 13:05       ` Namhyung Kim
@ 2010-12-06 15:56         ` Greg KH
  2010-12-06 16:03           ` [PATCH RESEND] " Namhyung Kim
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2010-12-06 15:56 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Greg KH, linux-usb, linux-kernel

On Mon, Dec 06, 2010 at 10:05:30PM +0900, Namhyung Kim wrote:
> 2010-12-01 (수), 09:36 -0800, Greg KH:
> > On Thu, Dec 02, 2010 at 01:49:11AM +0900, Namhyung Kim wrote:
> > > 2010-12-01 (수), 08:10 -0800, Greg KH:
> > > > On Wed, Dec 01, 2010 at 01:28:41PM +0900, Namhyung Kim wrote:
> > > > > Annotate whci_hcd_id_table as '__used' to fix following warning:
> > > > > 
> > > > >   CC      drivers/usb/host/whci/hcd.o
> > > > > drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used
> > > > 
> > > > Are you seeing this warning when you build the module into the kernel,
> > > > or as a module?
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > > 
> > > I saw it during allyesconfig build but not on allmodconfig.
> > > Maybe we can wrap it up in #ifdef CONFIG_MODULES ?
> > 
> > No, don't do that, your __used is the correct thing here, I just wanted
> > to make sure why you were seeing this warning.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hi, Greg
> 
> It seems this one is not applied in your tree yet. Do you need a resend?

Yes please, I must have missed it, thinking it was part of your other
series.  Sorry.

greg k-h

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

* [PATCH RESEND] USB: whci-hcd: fix compiler warning
  2010-12-06 15:56         ` Greg KH
@ 2010-12-06 16:03           ` Namhyung Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Namhyung Kim @ 2010-12-06 16:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

Annotate whci_hcd_id_table as '__used' to fix following warning:

  CC      drivers/usb/host/whci/hcd.o
drivers/usb/host/whci/hcd.c:359: warning: ‘whci_hcd_id_table’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 drivers/usb/host/whci/hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c
index 72b6892..9546f6c 100644
--- a/drivers/usb/host/whci/hcd.c
+++ b/drivers/usb/host/whci/hcd.c
@@ -356,7 +356,7 @@ static void __exit whci_hc_driver_exit(void)
 module_exit(whci_hc_driver_exit);
 
 /* PCI device ID's that we handle (so it gets loaded) */
-static struct pci_device_id whci_hcd_id_table[] = {
+static struct pci_device_id __used whci_hcd_id_table[] = {
 	{ PCI_DEVICE_CLASS(PCI_CLASS_WIRELESS_WHCI, ~0) },
 	{ /* empty last entry */ }
 };
-- 
1.7.0.4


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

end of thread, other threads:[~2010-12-06 16:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01  4:28 [PATCH] USB: whci-hcd: fix compiler warning Namhyung Kim
2010-12-01 16:10 ` Greg KH
2010-12-01 16:49   ` Namhyung Kim
2010-12-01 16:52     ` David Vrabel
2010-12-01 17:02       ` Namhyung Kim
2010-12-01 17:06         ` David Vrabel
2010-12-01 17:11           ` Namhyung Kim
2010-12-01 17:36     ` Greg KH
2010-12-06 13:05       ` Namhyung Kim
2010-12-06 15:56         ` Greg KH
2010-12-06 16:03           ` [PATCH RESEND] " Namhyung Kim

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