mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tom \"spot\" Callaway" <tcallawa@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix compiler warning noise with FORE200E driver
Date: Thu, 13 Dec 2007 11:21:40 -0500	[thread overview]
Message-ID: <1197562900.17945.16.camel@localhost.localdomain> (raw)

[-- 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] },

             reply	other threads:[~2007-12-13 16:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 16:21 Tom "spot" Callaway [this message]
2007-12-13 17:34 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1197562900.17945.16.camel@localhost.localdomain \
    --to=tcallawa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome