2020-02-14 18:04:02

by Sasha Levin

[permalink] [raw]
Subject: [PATCH AUTOSEL 5.5 383/542] gpio: Fix the no return statement warning

From: Kevin Hao <[email protected]>

[ Upstream commit 9c6722d85e92233082da2b3623685bba54d6093e ]

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.

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]>
Signed-off-by: Sasha Levin <[email protected]>
---
include/linux/gpio/driver.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index e2480ef94c559..5dce9c67a961e 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -553,6 +553,7 @@ static inline void gpiochip_populate_parent_fwspec_twocell(struct gpio_chip *chi
unsigned int parent_hwirq,
unsigned int parent_type)
{
+ return NULL;
}

static inline void gpiochip_populate_parent_fwspec_fourcell(struct gpio_chip *chip,
@@ -560,6 +561,7 @@ static inline void gpiochip_populate_parent_fwspec_fourcell(struct gpio_chip *ch
unsigned int parent_hwirq,
unsigned int parent_type)
{
+ return NULL;
}

#endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */
--
2.20.1


2020-02-15 00:46:29

by Kevin Hao

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 5.5 383/542] gpio: Fix the no return statement warning

On Fri, Feb 14, 2020 at 10:46:15AM -0500, Sasha Levin wrote:
> From: Kevin Hao <[email protected]>
>
> [ Upstream commit 9c6722d85e92233082da2b3623685bba54d6093e ]
>
> 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.
>
> 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]>
> Signed-off-by: Sasha Levin <[email protected]>
> ---
> include/linux/gpio/driver.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index e2480ef94c559..5dce9c67a961e 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -553,6 +553,7 @@ static inline void gpiochip_populate_parent_fwspec_twocell(struct gpio_chip *chi
> unsigned int parent_hwirq,
> unsigned int parent_type)
> {
> + return NULL;

Hi Sasha,

This commit shouldn't go to the v5.5.x kernel. This is a fix for the
commit 242587616710, but that commit doesn't exist in the v5.5.x kernel,
then it will trigger a build warning due to the wrong returning type.

Thanks,
Kevin

> }
>
> static inline void gpiochip_populate_parent_fwspec_fourcell(struct gpio_chip *chip,
> @@ -560,6 +561,7 @@ static inline void gpiochip_populate_parent_fwspec_fourcell(struct gpio_chip *ch
> unsigned int parent_hwirq,
> unsigned int parent_type)
> {
> + return NULL;
> }
>
> #endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */
> --
> 2.20.1
>


Attachments:
(No filename) (1.88 kB)
signature.asc (499.00 B)
Download all attachments

2020-02-20 17:21:01

by Sasha Levin

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 5.5 383/542] gpio: Fix the no return statement warning

On Sat, Feb 15, 2020 at 08:44:55AM +0800, Kevin Hao wrote:
>On Fri, Feb 14, 2020 at 10:46:15AM -0500, Sasha Levin wrote:
>> From: Kevin Hao <[email protected]>
>>
>> [ Upstream commit 9c6722d85e92233082da2b3623685bba54d6093e ]
>>
>> 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.
>>
>> 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]>
>> Signed-off-by: Sasha Levin <[email protected]>
>> ---
>> include/linux/gpio/driver.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
>> index e2480ef94c559..5dce9c67a961e 100644
>> --- a/include/linux/gpio/driver.h
>> +++ b/include/linux/gpio/driver.h
>> @@ -553,6 +553,7 @@ static inline void gpiochip_populate_parent_fwspec_twocell(struct gpio_chip *chi
>> unsigned int parent_hwirq,
>> unsigned int parent_type)
>> {
>> + return NULL;
>
>Hi Sasha,
>
>This commit shouldn't go to the v5.5.x kernel. This is a fix for the
>commit 242587616710, but that commit doesn't exist in the v5.5.x kernel,
>then it will trigger a build warning due to the wrong returning type.

Now dropped, thank you.

--
Thanks,
Sasha