* [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants @ 2025-02-12 8:59 Bartosz Golaszewski 2025-02-12 9:02 ` Bartosz Golaszewski 2025-02-20 15:19 ` Lee Jones 0 siblings, 2 replies; 6+ messages in thread From: Bartosz Golaszewski @ 2025-02-12 8:59 UTC (permalink / raw) To: Lee Jones, Pavel Machek Cc: linux-leds, linux-kernel, Bartosz Golaszewski, kernel test robot From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> While it now returns void, it will soon be converted to return an integer instead. Don't do `return gpiod_set...`. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202502121512.CmoMg9Q7-lkp@intel.com/ Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- drivers/leds/leds-aw200xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c index 08cca128458c..fe223d363a5d 100644 --- a/drivers/leds/leds-aw200xx.c +++ b/drivers/leds/leds-aw200xx.c @@ -379,7 +379,7 @@ static void aw200xx_enable(const struct aw200xx *const chip) static void aw200xx_disable(const struct aw200xx *const chip) { - return gpiod_set_value_cansleep(chip->hwen, 0); + gpiod_set_value_cansleep(chip->hwen, 0); } static int aw200xx_probe_get_display_rows(struct device *dev, -- 2.45.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants 2025-02-12 8:59 [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants Bartosz Golaszewski @ 2025-02-12 9:02 ` Bartosz Golaszewski 2025-02-12 15:55 ` Lee Jones 2025-02-20 15:19 ` Lee Jones 1 sibling, 1 reply; 6+ messages in thread From: Bartosz Golaszewski @ 2025-02-12 9:02 UTC (permalink / raw) To: Lee Jones, Pavel Machek Cc: linux-leds, linux-kernel, Bartosz Golaszewski, kernel test robot On Wed, Feb 12, 2025 at 9:59 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > While it now returns void, it will soon be converted to return an > integer instead. Don't do `return gpiod_set...`. > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202502121512.CmoMg9Q7-lkp@intel.com/ > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > drivers/leds/leds-aw200xx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c > index 08cca128458c..fe223d363a5d 100644 > --- a/drivers/leds/leds-aw200xx.c > +++ b/drivers/leds/leds-aw200xx.c > @@ -379,7 +379,7 @@ static void aw200xx_enable(const struct aw200xx *const chip) > > static void aw200xx_disable(const struct aw200xx *const chip) > { > - return gpiod_set_value_cansleep(chip->hwen, 0); > + gpiod_set_value_cansleep(chip->hwen, 0); > } > > static int aw200xx_probe_get_display_rows(struct device *dev, > -- > 2.45.2 > Lee, Pavel: If this is OK for you, can you please provide me with an immutable branch so that I can pull it into the GPIO tree? It seems it's the only such use-case in the tree apart from the gpio.h header that I can fix locally. Alternatively you can just Ack this and let me take it through the GPIO tree. Bartosz ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants 2025-02-12 9:02 ` Bartosz Golaszewski @ 2025-02-12 15:55 ` Lee Jones 2025-02-12 16:39 ` Bartosz Golaszewski 0 siblings, 1 reply; 6+ messages in thread From: Lee Jones @ 2025-02-12 15:55 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Pavel Machek, linux-leds, linux-kernel, Bartosz Golaszewski, kernel test robot On Wed, 12 Feb 2025, Bartosz Golaszewski wrote: > On Wed, Feb 12, 2025 at 9:59 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > While it now returns void, it will soon be converted to return an > > integer instead. Don't do `return gpiod_set...`. > > > > Reported-by: kernel test robot <lkp@intel.com> > > Closes: https://lore.kernel.org/oe-kbuild-all/202502121512.CmoMg9Q7-lkp@intel.com/ > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > drivers/leds/leds-aw200xx.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c > > index 08cca128458c..fe223d363a5d 100644 > > --- a/drivers/leds/leds-aw200xx.c > > +++ b/drivers/leds/leds-aw200xx.c > > @@ -379,7 +379,7 @@ static void aw200xx_enable(const struct aw200xx *const chip) > > > > static void aw200xx_disable(const struct aw200xx *const chip) > > { > > - return gpiod_set_value_cansleep(chip->hwen, 0); > > + gpiod_set_value_cansleep(chip->hwen, 0); > > } > > > > static int aw200xx_probe_get_display_rows(struct device *dev, > > -- > > 2.45.2 > > > > Lee, Pavel: > > If this is OK for you, can you please provide me with an immutable > branch so that I can pull it into the GPIO tree? It seems it's the > only such use-case in the tree apart from the gpio.h header that I can > fix locally. Alternatively you can just Ack this and let me take it > through the GPIO tree. I'm okay with it, but why do you need it? -- Lee Jones [李琼斯] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants 2025-02-12 15:55 ` Lee Jones @ 2025-02-12 16:39 ` Bartosz Golaszewski 2025-02-17 10:44 ` Bartosz Golaszewski 0 siblings, 1 reply; 6+ messages in thread From: Bartosz Golaszewski @ 2025-02-12 16:39 UTC (permalink / raw) To: Lee Jones Cc: Pavel Machek, linux-leds, linux-kernel, Bartosz Golaszewski, kernel test robot On Wed, Feb 12, 2025 at 4:55 PM Lee Jones <lee@kernel.org> wrote: > > On Wed, 12 Feb 2025, Bartosz Golaszewski wrote: > > > On Wed, Feb 12, 2025 at 9:59 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > While it now returns void, it will soon be converted to return an > > > integer instead. Don't do `return gpiod_set...`. > > > > > > Reported-by: kernel test robot <lkp@intel.com> > > > Closes: https://lore.kernel.org/oe-kbuild-all/202502121512.CmoMg9Q7-lkp@intel.com/ > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > --- > > > drivers/leds/leds-aw200xx.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c > > > index 08cca128458c..fe223d363a5d 100644 > > > --- a/drivers/leds/leds-aw200xx.c > > > +++ b/drivers/leds/leds-aw200xx.c > > > @@ -379,7 +379,7 @@ static void aw200xx_enable(const struct aw200xx *const chip) > > > > > > static void aw200xx_disable(const struct aw200xx *const chip) > > > { > > > - return gpiod_set_value_cansleep(chip->hwen, 0); > > > + gpiod_set_value_cansleep(chip->hwen, 0); > > > } > > > > > > static int aw200xx_probe_get_display_rows(struct device *dev, > > > -- > > > 2.45.2 > > > > > > > Lee, Pavel: > > > > If this is OK for you, can you please provide me with an immutable > > branch so that I can pull it into the GPIO tree? It seems it's the > > only such use-case in the tree apart from the gpio.h header that I can > > fix locally. Alternatively you can just Ack this and let me take it > > through the GPIO tree. > > I'm okay with it, but why do you need it? > For historical reasons gpiod_set_value() and its variants don't have a return value. However, we now support all kinds of hardware that can fail to set a line value: I2C, SPI, USB (hot-unpluggable chips), etc. I want to rework the GPIO subsystem to make these functions return int and become able to indicate failures. Build-bot complained about my series[1] and pointed at this driver after the interface for gpiod_set_value_cansleep() changed in patch 1. This is why I want to fix it, get it into my tree and then pick up the series. Sorry for not explaining it in detail earlier. Bart [1] https://lore.kernel.org/linux-gpio/20250211-gpio-set-retval-v1-0-52d3d613d7d3@linaro.org/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants 2025-02-12 16:39 ` Bartosz Golaszewski @ 2025-02-17 10:44 ` Bartosz Golaszewski 0 siblings, 0 replies; 6+ messages in thread From: Bartosz Golaszewski @ 2025-02-17 10:44 UTC (permalink / raw) To: Lee Jones Cc: Pavel Machek, linux-leds, linux-kernel, Bartosz Golaszewski, kernel test robot On Wed, Feb 12, 2025 at 5:39 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > On Wed, Feb 12, 2025 at 4:55 PM Lee Jones <lee@kernel.org> wrote: > > > > On Wed, 12 Feb 2025, Bartosz Golaszewski wrote: > > > > > On Wed, Feb 12, 2025 at 9:59 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > > > While it now returns void, it will soon be converted to return an > > > > integer instead. Don't do `return gpiod_set...`. > > > > > > > > Reported-by: kernel test robot <lkp@intel.com> > > > > Closes: https://lore.kernel.org/oe-kbuild-all/202502121512.CmoMg9Q7-lkp@intel.com/ > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > --- > > > > drivers/leds/leds-aw200xx.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c > > > > index 08cca128458c..fe223d363a5d 100644 > > > > --- a/drivers/leds/leds-aw200xx.c > > > > +++ b/drivers/leds/leds-aw200xx.c > > > > @@ -379,7 +379,7 @@ static void aw200xx_enable(const struct aw200xx *const chip) > > > > > > > > static void aw200xx_disable(const struct aw200xx *const chip) > > > > { > > > > - return gpiod_set_value_cansleep(chip->hwen, 0); > > > > + gpiod_set_value_cansleep(chip->hwen, 0); > > > > } > > > > > > > > static int aw200xx_probe_get_display_rows(struct device *dev, > > > > -- > > > > 2.45.2 > > > > > > > > > > Lee, Pavel: > > > > > > If this is OK for you, can you please provide me with an immutable > > > branch so that I can pull it into the GPIO tree? It seems it's the > > > only such use-case in the tree apart from the gpio.h header that I can > > > fix locally. Alternatively you can just Ack this and let me take it > > > through the GPIO tree. > > > > I'm okay with it, but why do you need it? > > > > For historical reasons gpiod_set_value() and its variants don't have a > return value. However, we now support all kinds of hardware that can > fail to set a line value: I2C, SPI, USB (hot-unpluggable chips), etc. > I want to rework the GPIO subsystem to make these functions return int > and become able to indicate failures. Build-bot complained about my > series[1] and pointed at this driver after the interface for > gpiod_set_value_cansleep() changed in patch 1. This is why I want to > fix it, get it into my tree and then pick up the series. > > Sorry for not explaining it in detail earlier. > > Bart > > [1] https://lore.kernel.org/linux-gpio/20250211-gpio-set-retval-v1-0-52d3d613d7d3@linaro.org/ Is it fine for you if I take it through the GPIO tree? Could you please leave your Ack under the patch if so? Thanks in advance, Bartosz ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants 2025-02-12 8:59 [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants Bartosz Golaszewski 2025-02-12 9:02 ` Bartosz Golaszewski @ 2025-02-20 15:19 ` Lee Jones 1 sibling, 0 replies; 6+ messages in thread From: Lee Jones @ 2025-02-20 15:19 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Pavel Machek, linux-leds, linux-kernel, Bartosz Golaszewski, kernel test robot On Wed, 12 Feb 2025, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > While it now returns void, it will soon be converted to return an > integer instead. Don't do `return gpiod_set...`. > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202502121512.CmoMg9Q7-lkp@intel.com/ > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > drivers/leds/leds-aw200xx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Lee Jones <lee@kernel.org> -- Lee Jones [李琼斯] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-20 15:19 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-02-12 8:59 [PATCH] leds: aw200xx: don't use return with gpiod_set_value() variants Bartosz Golaszewski 2025-02-12 9:02 ` Bartosz Golaszewski 2025-02-12 15:55 ` Lee Jones 2025-02-12 16:39 ` Bartosz Golaszewski 2025-02-17 10:44 ` Bartosz Golaszewski 2025-02-20 15:19 ` Lee Jones
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox