linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error
@ 2024-01-03  8:50 Chen Ni
  2024-01-03  8:56 ` Bartosz Golaszewski
  2024-01-27 22:45 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Ni @ 2024-01-03  8:50 UTC (permalink / raw)
  To: patrice.chotard, linus.walleij, bartosz.golaszewski
  Cc: linux-arm-kernel, linux-gpio, linux-kernel, Chen Ni

Return pinctrl_gpio_direction_output() in order to transfer the error
if it fails.

Fixes: b679d6c06b2b ("treewide: rename pinctrl_gpio_direction_output_new()")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/pinctrl/pinctrl-st.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 1485573b523c..5d9abd6547d0 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -723,9 +723,8 @@ static int st_gpio_direction_output(struct gpio_chip *chip,
 	struct st_gpio_bank *bank = gpiochip_get_data(chip);
 
 	__st_gpio_set(bank, offset, value);
-	pinctrl_gpio_direction_output(chip, offset);
 
-	return 0;
+	return pinctrl_gpio_direction_output(chip, offset);
 }
 
 static int st_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error
  2024-01-03  8:50 [PATCH] pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error Chen Ni
@ 2024-01-03  8:56 ` Bartosz Golaszewski
  2024-01-27 22:45 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-01-03  8:56 UTC (permalink / raw)
  To: Chen Ni
  Cc: patrice.chotard, linus.walleij, linux-arm-kernel, linux-gpio,
	linux-kernel

On Wed, 3 Jan 2024 at 09:47, Chen Ni <nichen@iscas.ac.cn> wrote:
>
> Return pinctrl_gpio_direction_output() in order to transfer the error
> if it fails.
>
> Fixes: b679d6c06b2b ("treewide: rename pinctrl_gpio_direction_output_new()")

It doesn't technically fix this commit as the return value was never
propagated here in the first place.

Anyway:

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Bart

> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
>  drivers/pinctrl/pinctrl-st.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index 1485573b523c..5d9abd6547d0 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -723,9 +723,8 @@ static int st_gpio_direction_output(struct gpio_chip *chip,
>         struct st_gpio_bank *bank = gpiochip_get_data(chip);
>
>         __st_gpio_set(bank, offset, value);
> -       pinctrl_gpio_direction_output(chip, offset);
>
> -       return 0;
> +       return pinctrl_gpio_direction_output(chip, offset);
>  }
>
>  static int st_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error
  2024-01-03  8:50 [PATCH] pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error Chen Ni
  2024-01-03  8:56 ` Bartosz Golaszewski
@ 2024-01-27 22:45 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2024-01-27 22:45 UTC (permalink / raw)
  To: Chen Ni
  Cc: patrice.chotard, bartosz.golaszewski, linux-arm-kernel,
	linux-gpio, linux-kernel

On Wed, Jan 3, 2024 at 9:47 AM Chen Ni <nichen@iscas.ac.cn> wrote:

> Return pinctrl_gpio_direction_output() in order to transfer the error
> if it fails.
>
> Fixes: b679d6c06b2b ("treewide: rename pinctrl_gpio_direction_output_new()")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-27 22:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03  8:50 [PATCH] pinctrl: st: Return pinctrl_gpio_direction_output to transfer the error Chen Ni
2024-01-03  8:56 ` Bartosz Golaszewski
2024-01-27 22:45 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).