[PATCH *-next 13/18] gpiolib: Remove needless return in two void APIs

Zijun Hu posted 18 patches 11 months, 3 weeks ago
[PATCH *-next 13/18] gpiolib: Remove needless return in two void APIs
Posted by Zijun Hu 11 months, 3 weeks ago
Remove needless 'return' in the following void APIs:

gpio_set_value_cansleep()
gpio_set_value()

Since both the API and callee involved are void functions.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
 include/linux/gpio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 6270150f4e29..c1ec62c11ed3 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -91,7 +91,7 @@ static inline int gpio_get_value_cansleep(unsigned gpio)
 }
 static inline void gpio_set_value_cansleep(unsigned gpio, int value)
 {
-	return gpiod_set_raw_value_cansleep(gpio_to_desc(gpio), value);
+	gpiod_set_raw_value_cansleep(gpio_to_desc(gpio), value);
 }
 
 static inline int gpio_get_value(unsigned gpio)
@@ -100,7 +100,7 @@ static inline int gpio_get_value(unsigned gpio)
 }
 static inline void gpio_set_value(unsigned gpio, int value)
 {
-	return gpiod_set_raw_value(gpio_to_desc(gpio), value);
+	gpiod_set_raw_value(gpio_to_desc(gpio), value);
 }
 
 static inline int gpio_to_irq(unsigned gpio)

-- 
2.34.1
Re: [PATCH *-next 13/18] gpiolib: Remove needless return in two void APIs
Posted by Bartosz Golaszewski 11 months, 3 weeks ago
On Fri, Feb 21, 2025 at 2:02 PM Zijun Hu <quic_zijuhu@quicinc.com> wrote:
>
> Remove needless 'return' in the following void APIs:
>
> gpio_set_value_cansleep()
> gpio_set_value()
>
> Since both the API and callee involved are void functions.
>
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> ---

That would normally make sense but we're getting that reworked[1] in
this very cycle so please drop this patch from your series.

Bart

[1] https://lore.kernel.org/linux-gpio/20250220-gpio-set-retval-v2-0-bc4cfd38dae3@linaro.org/
Re: [PATCH *-next 13/18] gpiolib: Remove needless return in two void APIs
Posted by Zijun Hu 11 months, 3 weeks ago
On 2/21/2025 9:06 PM, Bartosz Golaszewski wrote:
> On Fri, Feb 21, 2025 at 2:02 PM Zijun Hu <quic_zijuhu@quicinc.com> wrote:
>>
>> Remove needless 'return' in the following void APIs:
>>
>> gpio_set_value_cansleep()
>> gpio_set_value()
>>
>> Since both the API and callee involved are void functions.
>>
>> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
>> ---
> 
> That would normally make sense but we're getting that reworked[1] in
> this very cycle so please drop this patch from your series.
> 

sure, will drop it in next revision.

> Bart
> 
> [1] https://lore.kernel.org/linux-gpio/20250220-gpio-set-retval-v2-0-bc4cfd38dae3@linaro.org/