All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table under #ifdef MODULE
@ 2010-12-01 17:45 Namhyung Kim
  2010-12-01 17:45 ` [PATCH 2/3] uwb: move whcrc_id_table " Namhyung Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Namhyung Kim @ 2010-12-01 17:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

Since whci_hcd_id_table is used only for module auto-loading
move it under #ifdef MODULE. This fixes 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, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c
index 72b6892..ee76401 100644
--- a/drivers/usb/host/whci/hcd.c
+++ b/drivers/usb/host/whci/hcd.c
@@ -355,12 +355,14 @@ static void __exit whci_hc_driver_exit(void)
 }
 module_exit(whci_hc_driver_exit);
 
+#ifdef MODULE
 /* PCI device ID's that we handle (so it gets loaded) */
 static struct pci_device_id whci_hcd_id_table[] = {
 	{ PCI_DEVICE_CLASS(PCI_CLASS_WIRELESS_WHCI, ~0) },
 	{ /* empty last entry */ }
 };
 MODULE_DEVICE_TABLE(pci, whci_hcd_id_table);
+#endif
 
 MODULE_DESCRIPTION("WHCI Wireless USB host controller driver");
 MODULE_AUTHOR("Cambridge Silicon Radio Ltd.");
-- 
1.7.0.4


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

* [PATCH 2/3] uwb: move whcrc_id_table under #ifdef MODULE
  2010-12-01 17:45 [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table under #ifdef MODULE Namhyung Kim
@ 2010-12-01 17:45 ` Namhyung Kim
  2010-12-01 17:45 ` [PATCH 3/3] uwb: move i1480_est_id_table " Namhyung Kim
  2010-12-01 19:37 ` [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table " Greg KH
  2 siblings, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2010-12-01 17:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, David Vrabel

Since whcrc_id_table is used only for module auto-loading
move it under #ifdef MODULE to fix following warning:

  CC      drivers/uwb/whc-rc.o
drivers/uwb/whc-rc.c:452: warning: ‘whcrc_id_table’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
---
 drivers/uwb/whc-rc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/uwb/whc-rc.c b/drivers/uwb/whc-rc.c
index 7349558..e3bd62a 100644
--- a/drivers/uwb/whc-rc.c
+++ b/drivers/uwb/whc-rc.c
@@ -448,12 +448,14 @@ static int whcrc_post_reset(struct umc_dev *umc)
 	return uwb_rc_post_reset(uwb_rc);
 }
 
+#ifdef MODULE
 /* PCI device ID's that we handle [so it gets loaded] */
 static struct pci_device_id whcrc_id_table[] = {
 	{ PCI_DEVICE_CLASS(PCI_CLASS_WIRELESS_WHCI, ~0) },
 	{ /* empty last entry */ }
 };
 MODULE_DEVICE_TABLE(pci, whcrc_id_table);
+#endif
 
 static struct umc_driver whcrc_driver = {
 	.name       = "whc-rc",
-- 
1.7.0.4


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

* [PATCH 3/3] uwb: move i1480_est_id_table under #ifdef MODULE
  2010-12-01 17:45 [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table under #ifdef MODULE Namhyung Kim
  2010-12-01 17:45 ` [PATCH 2/3] uwb: move whcrc_id_table " Namhyung Kim
@ 2010-12-01 17:45 ` Namhyung Kim
  2010-12-01 19:37 ` [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table " Greg KH
  2 siblings, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2010-12-01 17:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, David Vrabel

Since i1480_est_id_table is used only for module auto-loading
move it under #ifdef MODULE to fix following warning:

  CC      drivers/uwb/i1480/i1480-est.o
drivers/uwb/i1480/i1480-est.c:94: warning: ‘i1480_est_id_table’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
---
 drivers/uwb/i1480/i1480-est.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/uwb/i1480/i1480-est.c b/drivers/uwb/i1480/i1480-est.c
index f2eb4d8..bcbaea2 100644
--- a/drivers/uwb/i1480/i1480-est.c
+++ b/drivers/uwb/i1480/i1480-est.c
@@ -86,6 +86,7 @@ MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>");
 MODULE_DESCRIPTION("i1480's Vendor Specific Event Size Tables");
 MODULE_LICENSE("GPL");
 
+#ifdef MODULE
 /**
  * USB device ID's that we handle
  *
@@ -97,3 +98,4 @@ static struct usb_device_id i1480_est_id_table[] = {
 	{ },
 };
 MODULE_DEVICE_TABLE(usb, i1480_est_id_table);
+#endif
-- 
1.7.0.4


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

* Re: [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table under #ifdef MODULE
  2010-12-01 17:45 [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table under #ifdef MODULE Namhyung Kim
  2010-12-01 17:45 ` [PATCH 2/3] uwb: move whcrc_id_table " Namhyung Kim
  2010-12-01 17:45 ` [PATCH 3/3] uwb: move i1480_est_id_table " Namhyung Kim
@ 2010-12-01 19:37 ` Greg KH
  2010-12-01 20:32   ` Namhyung Kim
  2 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2010-12-01 19:37 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: linux-usb, linux-kernel

On Thu, Dec 02, 2010 at 02:45:27AM +0900, Namhyung Kim wrote:
> Since whci_hcd_id_table is used only for module auto-loading
> move it under #ifdef MODULE. This fixes 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, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c
> index 72b6892..ee76401 100644
> --- a/drivers/usb/host/whci/hcd.c
> +++ b/drivers/usb/host/whci/hcd.c
> @@ -355,12 +355,14 @@ static void __exit whci_hc_driver_exit(void)
>  }
>  module_exit(whci_hc_driver_exit);
>  
> +#ifdef MODULE

Ick, no, please just use the __used type instead.  We don't want #ifdefs
in .c files if at all possible.

Same goes for the other 2 patches, care to redo them as well?

thanks,

greg k-h

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

* Re: [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table under #ifdef MODULE
  2010-12-01 19:37 ` [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table " Greg KH
@ 2010-12-01 20:32   ` Namhyung Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2010-12-01 20:32 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb, linux-kernel

On Thu, Dec 2, 2010 at 04:37, Greg KH <gregkh@suse.de> wrote:
> Ick, no, please just use the __used type instead.  We don't want #ifdefs
> in .c files if at all possible.
>
> Same goes for the other 2 patches, care to redo them as well?
>

OK. Will send them again.

-- 
Regards,
Namhyung Kim

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

end of thread, other threads:[~2010-12-01 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01 17:45 [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table under #ifdef MODULE Namhyung Kim
2010-12-01 17:45 ` [PATCH 2/3] uwb: move whcrc_id_table " Namhyung Kim
2010-12-01 17:45 ` [PATCH 3/3] uwb: move i1480_est_id_table " Namhyung Kim
2010-12-01 19:37 ` [PATCH 1/3] USB: whci-hcd: move whci_hcd_id_table " Greg KH
2010-12-01 20:32   ` Namhyung Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.