public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix compiler warning noise with FORE200E driver
@ 2007-12-13 16:21 Tom "spot" Callaway
  2007-12-13 17:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tom "spot" Callaway @ 2007-12-13 16:21 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

gcc throws these warnings with:

CONFIG_ATM_FORE200E=m
# CONFIG_ATM_FORE200E_PCA is not set

drivers/atm/fore200e.c:2695: warning: 'fore200e_pca_detect' defined but
not used
drivers/atm/fore200e.c:2748: warning: 'fore200e_pca_remove_one' defined
but not used

By moving the #ifdef CONFIG_ATM_FORE200E_PCA around those two functions,
the compiler warnings are silenced.

(btw, I'm not subscribed to lkml, so please CC me on any responses,
although this is a wholly trivial patch, so I'm not expecting any.)

Signed-off-by: Tom "spot" Callaway <tcallawa@redhat.com>


[-- Attachment #2: linux-2.6.23-fore200e-warning-fix.patch --]
[-- Type: text/x-patch, Size: 597 bytes --]

--- linux-2.6.23.sparc64/drivers/atm/fore200e.c.BAD	2007-12-13 10:45:57.000000000 -0500
+++ linux-2.6.23.sparc64/drivers/atm/fore200e.c	2007-12-13 10:46:23.000000000 -0500
@@ -2689,7 +2689,7 @@
     return 0;
 }
 
-
+#ifdef CONFIG_ATM_FORE200E_PCA
 static int __devinit
 fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
 {
@@ -2756,7 +2756,6 @@
 }
 
 
-#ifdef CONFIG_ATM_FORE200E_PCA
 static struct pci_device_id fore200e_pca_tbl[] = {
     { PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, PCI_ANY_ID, PCI_ANY_ID,
       0, 0, (unsigned long) &fore200e_bus[0] },

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

* Re: [PATCH] Fix compiler warning noise with FORE200E driver
  2007-12-13 16:21 [PATCH] Fix compiler warning noise with FORE200E driver Tom "spot" Callaway
@ 2007-12-13 17:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-12-13 17:34 UTC (permalink / raw)
  To: tcallawa; +Cc: linux-kernel

From: "Tom \"spot\" Callaway" <tcallawa@redhat.com>
Date: Thu, 13 Dec 2007 11:21:40 -0500

> gcc throws these warnings with:
> 
> CONFIG_ATM_FORE200E=m
> # CONFIG_ATM_FORE200E_PCA is not set
> 
> drivers/atm/fore200e.c:2695: warning: 'fore200e_pca_detect' defined but
> not used
> drivers/atm/fore200e.c:2748: warning: 'fore200e_pca_remove_one' defined
> but not used
> 
> By moving the #ifdef CONFIG_ATM_FORE200E_PCA around those two functions,
> the compiler warnings are silenced.
> 
> (btw, I'm not subscribed to lkml, so please CC me on any responses,
> although this is a wholly trivial patch, so I'm not expecting any.)
> 
> Signed-off-by: Tom "spot" Callaway <tcallawa@redhat.com>

Applied, thanks Tom.


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

end of thread, other threads:[~2007-12-13 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 16:21 [PATCH] Fix compiler warning noise with FORE200E driver Tom "spot" Callaway
2007-12-13 17:34 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox