Skip to contentSkip to conversation

gpio/omap: omap_gpio_init_context stub must be inline

PATCH New Arnd Bergmann 4 participants 4 messages May 31, 2013 – Jun 17, 2013

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

PATCH 1/1 gpio/omap: omap_gpio_init_context stub must be inline

The bug fix 352a2d5bf "gpio/omap: ensure gpio context is initialised" has caused a new warning for omap1_defconfig:

drivers/gpio/gpio-omap.c:1465:13: warning: 'omap_gpio_init_context' defined but not used [-Wunused-function]
static void omap_gpio_init_context(struct gpio_bank *p) {}

             ^

The solution is to mark the stub function as 'static inline' so it gets left out of the build when unused.

---

drivers/gpio/gpio-omap.c +1 -1
index d3f7d2d..e5fba65 100644
@@ -1462,7 +1462,7 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
 #else
 #define omap_gpio_runtime_suspend NULL
 #define omap_gpio_runtime_resume NULL
-static void omap_gpio_init_context(struct gpio_bank *p) {}
+static inline void omap_gpio_init_context(struct gpio_bank *p) {}
 #endif
 
 static const struct dev_pm_ops gpio_pm_ops = {
#1 lore raw

PATCH 1/1 gpio/omap: omap_gpio_init_context stub must be inline

Quoted 9 lines · Arnd Bergmann

The bug fix 352a2d5bf "gpio/omap: ensure gpio context is initialised" has caused a new warning for omap1_defconfig:

drivers/gpio/gpio-omap.c:1465:13: warning: 'omap_gpio_init_context' defined but not used [-Wunused-function]
static void omap_gpio_init_context(struct gpio_bank *p) {}

             ^

The solution is to mark the stub function as 'static inline' so it gets left out of the build when unused.

Quoted 20 lines

---

drivers/gpio/gpio-omap.c +1 -2
index d3f7d2d..e5fba65 100644
@@ -1462,7 +1462,7 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
 #else
 #define omap_gpio_runtime_suspend NULL
 #define omap_gpio_runtime_resume NULL
-static void omap_gpio_init_context(struct gpio_bank *p) {}
+static inline void omap_gpio_init_context(struct gpio_bank *p) {}
 #endif
 
 static const struct dev_pm_ops gpio_pm_ops = {
 
--

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

#2 lore raw

PATCH 1/1 gpio/omap: omap_gpio_init_context stub must be inline

In reply to Arnd Bergmann
Quoted 5 lines · Arnd Bergmann

The bug fix 352a2d5bf "gpio/omap: ensure gpio context is initialised" has caused a new warning for omap1_defconfig:

drivers/gpio/gpio-omap.c:1465:13: warning: 'omap_gpio_init_context' defined but not used [-Wunused-function]
static void omap_gpio_init_context(struct gpio_bank *p) {}

Quoted 7 lines
             ^

The solution is to mark the stub function as 'static inline' so it gets left out of the build when unused.

---

#3 lore raw

PATCH 1/1 gpio/omap: omap_gpio_init_context stub must be inline

In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

The bug fix 352a2d5bf "gpio/omap: ensure gpio context is initialised" has caused a new warning for omap1_defconfig:

drivers/gpio/gpio-omap.c:1465:13: warning: 'omap_gpio_init_context' defined but not used [-Wunused-function]
static void omap_gpio_init_context(struct gpio_bank *p) {}

             ^

The solution is to mark the stub function as 'static inline' so it gets left out of the build when unused.

Patch applied with Tony's and Santosh's ACKs.

Yours,
Linus Walleij