Skip to contentSkip to conversation

Fix omap-gpio warnings when compiling for ARCH_OMAP15XX

PATCH In review Jonathan McDowell 3 participants 3 messages Nov 11, 2008 – Nov 26, 2008

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

PATCH 1/1 Fix omap-gpio warnings when compiling for ARCH_OMAP15XX

When compiling for ARCH_OMAP15XX I get the following compiler warning in gpio.c:

arch/arm/plat-omap/gpio.c: In function ‘_set_gpio_wakeup’:
arch/arm/plat-omap/gpio.c:848: warning: unused variable ‘flags’

Simple patch below fixes this.

-----

arch/arm/plat-omap/gpio.c +3 -0
index 8bb4542..bfbe366 100644
@@ -845,7 +845,10 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena
  */
 static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
 {
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) || \
+		defined(CONFIG_ARCH_OMAP34XX)
 	unsigned long flags;
+#endif
 
 	switch (bank->method) {
 #ifdef CONFIG_ARCH_OMAP16XX

-----

J.

Signature · 7 lines
Web [   Asking whether machines can think is like asking whether   ]
site: http:// [           submarines can swim.           ]       Made by
www.earth.li/~noodles/  [                      ]         HuggieTag 0.0.23
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 7 lines · Jonathan McDowell

When compiling for ARCH_OMAP15XX I get the following compiler warning in gpio.c:

arch/arm/plat-omap/gpio.c: In function ‘_set_gpio_wakeup’:
arch/arm/plat-omap/gpio.c:848: warning: unused variable ‘flags’

Simple patch below fixes this.

Sorry for the delay on responding to this.. Let's rather start splitting the gpio code into common code and processor specific code to fix issues like this for good. In this case, we would only register set_wakeup functions for 16xx, 24xx, and 34xx.

Regards,

Tony

Quoted 21 lines

-----

arch/arm/plat-omap/gpio.c +3 -1
index 8bb4542..bfbe366 100644
@@ -845,7 +845,10 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena
  */
 static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
 {
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) || \
+		defined(CONFIG_ARCH_OMAP34XX)
 	unsigned long flags;
+#endif
 
 	switch (bank->method) {
 #ifdef CONFIG_ARCH_OMAP16XX
-----
Quoted 10 lines

J.

Signature · 7 lines
Web [   Asking whether machines can think is like asking whether   ]
site: http:// [           submarines can swim.           ]       Made by
www.earth.li/~noodles/  [                      ]         HuggieTag 0.0.23
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 3 lines · Tony Lindgren

Let's rather start
splitting the gpio code into common code and processor specific code to fix issues like this for good.

Working on that. :)