Skip to contentSkip to conversation

gpio: Fix the no return statement warning for gpiochip_populate_parent_fwspec_twocell/fourcell()

PATCH In review Kevin Hao 2 participants 2 messages Jan 16, 2020 GPIO

lore
Share & tools
lore

Kevin Hao

author
#0 lore raw

PATCH 1/1 gpio: Fix the no return statement warning for gpiochip_populate_parent_fwspec_twocell/fourcell()

In commit 242587616710 ("gpiolib: Add support for the irqdomain which doesn't use irq_fwspec as arg") we have changed the return type of gpiochip_populate_parent_fwspec_twocell/fourcell() from void to void *, but forgot to add a return statement for these two dummy functions. Add "return NULL" to fix the build warnings.

---
 include/linux/gpio/driver.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/gpio/driver.h +2 -0
index ea6e615ad7fc..18350f274905 100644
@@ -549,12 +549,14 @@ static inline void *gpiochip_populate_parent_fwspec_twocell(struct gpio_chip *ch
 						    unsigned int parent_hwirq,
 						    unsigned int parent_type)
 {
+	return NULL;
 }
 
 static inline void *gpiochip_populate_parent_fwspec_fourcell(struct gpio_chip *chip,
 						     unsigned int parent_hwirq,
 						     unsigned int parent_type)
 {
+	return NULL;
 }
 
 #endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */
Signature · 1 line
2.14.4
#1 lore raw
Quoted 8 lines · Kevin Hao

In commit 242587616710 ("gpiolib: Add support for the irqdomain which doesn't use irq_fwspec as arg") we have changed the return type of gpiochip_populate_parent_fwspec_twocell/fourcell() from void to void *, but forgot to add a return statement for these two dummy functions. Add "return NULL" to fix the build warnings.

Patch applied on top of the other fixes and pushed for inclusion in linux-next!

Thanks for your hard work on fixing this Kevin!

Yours,
Linus Walleij