Skip to contentSkip to conversation

smc911x: Fix undefined CONFIG_ symbol warning

PATCH Applied Peter Korsgaard 2 participants 2 messages Nov 21, 2007 – Nov 24, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smc911x: Fix undefined CONFIG_ symbol warning

elif defined(CONFIG_*) should be used instead of elif CONFIG_* so GCC doesn't give warnings about undefined symbols when the config option is disabled.

---
 drivers/net/smc911x.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/smc911x.h +1 -1
index 16a0edc..d04e4fa 100644
@@ -37,7 +37,7 @@
   #define SMC_USE_16BIT		0
   #define SMC_USE_32BIT		1
   #define SMC_IRQ_SENSE		IRQF_TRIGGER_FALLING
-#elif CONFIG_SH_MAGIC_PANEL_R2
+#elif defined(CONFIG_SH_MAGIC_PANEL_R2)
   #define SMC_USE_SH_DMA	0
   #define SMC_USE_16BIT		0
   #define SMC_USE_32BIT		1
Signature · 1 line
1.5.3.4
Applied
#1 lore raw
Quoted 12 lines · Peter Korsgaard

elif defined(CONFIG_*) should be used instead of elif CONFIG_* so GCC doesn't give warnings about undefined symbols when the config option is disabled.

---
 drivers/net/smc911x.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/smc911x.h +0 -0
index 16a0edc..d04e4fa 100644

drivers/net/smc911x.h line 42

Quoted 7 lines
drivers/net/smc911x.h +1 -1
@@ -37,7 +37,7 @@
   #define SMC_USE_16BIT		0
   #define SMC_USE_32BIT		1
   #define SMC_IRQ_SENSE		IRQF_TRIGGER_FALLING
-#elif CONFIG_SH_MAGIC_PANEL_R2
+#elif defined(CONFIG_SH_MAGIC_PANEL_R2)
   #define SMC_USE_SH_DMA	0
   #define SMC_USE_16BIT		0

applied all three to #upstream-fixes