From: Andries.Brouwer@cwi.nl
To: jgarzik@pobox.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] warning fix e100_main.c
Date: Tue, 22 Apr 2003 14:16:02 +0200 (MEST) [thread overview]
Message-ID: <UTC200304221216.h3MCG2421837.aeb@smtp.cwi.nl> (raw)
drivers/net/e100/e100_main.c:4176: warning: `e100_asf_enabled' defined but not used
Since e100_asf_enabled is used only inside #ifdef CONFIG_PM
this patch moves its definition also inside.
diff -u --recursive --new-file -X /linux/dontdiff a/drivers/net/e100/e100_main.c b/drivers/net/e100/e100_main.c
--- a/drivers/net/e100/e100_main.c Sun Apr 20 12:59:32 2003
+++ b/drivers/net/e100/e100_main.c Tue Apr 22 14:11:57 2003
@@ -228,7 +228,6 @@
char *);
unsigned char e100_wait_exec_cmplx(struct e100_private *, u32, u8, u8);
void e100_exec_cmplx(struct e100_private *, u32, u8);
-static unsigned char e100_asf_enabled(struct e100_private *bdp);
/**
* e100_get_rx_struct - retrieve cell to hold skb buff from the pool
@@ -4102,6 +4101,31 @@
}
#ifdef CONFIG_PM
+/**
+ * e100_asf_enabled - checks if ASF is configured on the current adaper
+ * by reading registers 0xD and 0x90 in the EEPROM
+ * @bdp: atapter's private data struct
+ *
+ * Returns: true if ASF is enabled
+ */
+static unsigned char
+e100_asf_enabled(struct e100_private *bdp)
+{
+ u16 asf_reg;
+ u16 smbus_addr_reg;
+ if ((bdp->pdev->device >= 0x1050) && (bdp->pdev->device <= 0x1055)) {
+ asf_reg = e100_eeprom_read(bdp, EEPROM_CONFIG_ASF);
+ if ((asf_reg & EEPROM_FLAG_ASF)
+ && !(asf_reg & EEPROM_FLAG_GCL)) {
+ smbus_addr_reg =
+ e100_eeprom_read(bdp, EEPROM_SMBUS_ADDR);
+ if ((smbus_addr_reg & 0xFF) != 0xFE)
+ return true;
+ }
+ }
+ return false;
+}
+
static int
e100_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
{
@@ -4164,31 +4188,6 @@
}
#endif /* CONFIG_PM */
-/**
- * e100_asf_enabled - checks if ASF is configured on the current adaper
- * by reading registers 0xD and 0x90 in the EEPROM
- * @bdp: atapter's private data struct
- *
- * Returns: true if ASF is enabled
- */
-static unsigned char
-e100_asf_enabled(struct e100_private *bdp)
-{
- u16 asf_reg;
- u16 smbus_addr_reg;
- if ((bdp->pdev->device >= 0x1050) && (bdp->pdev->device <= 0x1055)) {
- asf_reg = e100_eeprom_read(bdp, EEPROM_CONFIG_ASF);
- if ((asf_reg & EEPROM_FLAG_ASF)
- && !(asf_reg & EEPROM_FLAG_GCL)) {
- smbus_addr_reg =
- e100_eeprom_read(bdp, EEPROM_SMBUS_ADDR);
- if ((smbus_addr_reg & 0xFF) != 0xFE)
- return true;
- }
- }
- return false;
-}
-
#ifdef E100_CU_DEBUG
unsigned char
e100_cu_unknown_state(struct e100_private *bdp)
reply other threads:[~2003-04-22 12:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=UTC200304221216.h3MCG2421837.aeb@smtp.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=jgarzik@pobox.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
all inboxes | Powered by JetHome®