Skip to content

Commit 9c6722d

Browse files
haokexinlinusw
authored andcommitted
gpio: Fix the no return statement warning
In commit 2425876 ("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. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Kevin Hao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 7a9f446 commit 9c6722d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/gpio/driver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,14 @@ static inline void *gpiochip_populate_parent_fwspec_twocell(struct gpio_chip *ch
549549
unsigned int parent_hwirq,
550550
unsigned int parent_type)
551551
{
552+
return NULL;
552553
}
553554

554555
static inline void *gpiochip_populate_parent_fwspec_fourcell(struct gpio_chip *chip,
555556
unsigned int parent_hwirq,
556557
unsigned int parent_type)
557558
{
559+
return NULL;
558560
}
559561

560562
#endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */

0 commit comments

Comments
 (0)