Message ID | 20250221-rmv_return-v1-13-cc8dff275827@quicinc.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Remove weird and needless 'return' for void APIs | expand |
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/
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/
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)
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(-)