* [PATCH] warning fix e100_main.c
@ 2003-04-22 12:16 Andries.Brouwer
0 siblings, 0 replies; only message in thread
From: Andries.Brouwer @ 2003-04-22 12:16 UTC (permalink / raw)
To: jgarzik; +Cc: linux-kernel
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-22 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22 12:16 [PATCH] warning fix e100_main.c Andries.Brouwer
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).