* [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
@ 2026-10-11 18:56 ` Raffaele Tranfaglia
0 siblings, 0 replies; 7+ messages in thread
From: Raffaele Tranfaglia via B4 Relay @ 2026-10-11 18:56 UTC (permalink / raw)
To: Nuno Sá, Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko, Greg Kroah-Hartman
Cc: linux, linux-iio, linux-staging, linux-kernel,
Raffaele Tranfaglia
From: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
Use dev_err_probe() when requesting the ldac GPIO fails. This
avoids logging an error when the GPIO controller is not ready yet
and the request returns -EPROBE_DEFER, and records the deferral
reason. It also simplifies the error path.
Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
---
Compile-tested only.
---
drivers/staging/iio/addac/adt7316.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 20f6052cc7fb..8ca6def84584 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -2142,11 +2142,9 @@ int adt7316_probe(struct device *dev, struct adt7316_bus *bus,
chip->ldac_pin = devm_gpiod_get_optional(dev, "adi,ldac",
GPIOD_OUT_LOW);
- if (IS_ERR(chip->ldac_pin)) {
- ret = PTR_ERR(chip->ldac_pin);
- dev_err(dev, "Failed to request ldac GPIO: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(chip->ldac_pin))
+ return dev_err_probe(dev, PTR_ERR(chip->ldac_pin),
+ "Failed to request ldac GPIO\n");
if (!chip->ldac_pin) {
chip->config3 |= ADT7316_DA_EN_VIA_DAC_LDAC;
---
base-commit: a22dc7ebb21a6bd4c8b63bc2c1dd46a24945aae7
change-id: 20261011-adt7316-dev-err-probe-8ffb5e224100
Best regards,
--
Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
@ 2026-10-11 18:56 ` Raffaele Tranfaglia
0 siblings, 0 replies; 7+ messages in thread
From: Raffaele Tranfaglia @ 2026-10-11 18:56 UTC (permalink / raw)
To: Nuno Sá, Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko, Greg Kroah-Hartman
Cc: linux, linux-iio, linux-staging, linux-kernel,
Raffaele Tranfaglia
Use dev_err_probe() when requesting the ldac GPIO fails. This
avoids logging an error when the GPIO controller is not ready yet
and the request returns -EPROBE_DEFER, and records the deferral
reason. It also simplifies the error path.
Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
---
Compile-tested only.
---
drivers/staging/iio/addac/adt7316.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 20f6052cc7fb..8ca6def84584 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -2142,11 +2142,9 @@ int adt7316_probe(struct device *dev, struct adt7316_bus *bus,
chip->ldac_pin = devm_gpiod_get_optional(dev, "adi,ldac",
GPIOD_OUT_LOW);
- if (IS_ERR(chip->ldac_pin)) {
- ret = PTR_ERR(chip->ldac_pin);
- dev_err(dev, "Failed to request ldac GPIO: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(chip->ldac_pin))
+ return dev_err_probe(dev, PTR_ERR(chip->ldac_pin),
+ "Failed to request ldac GPIO\n");
if (!chip->ldac_pin) {
chip->config3 |= ADT7316_DA_EN_VIA_DAC_LDAC;
---
base-commit: a22dc7ebb21a6bd4c8b63bc2c1dd46a24945aae7
change-id: 20261011-adt7316-dev-err-probe-8ffb5e224100
Best regards,
--
Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
2026-10-11 18:56 ` Raffaele Tranfaglia
(?)
@ 2026-10-12 14:35 ` Nuno Sá
2026-10-12 21:27 ` Andy Shevchenko
-1 siblings, 1 reply; 7+ messages in thread
From: Nuno Sá @ 2026-10-12 14:35 UTC (permalink / raw)
To: raffaele.tranfaglia
Cc: Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko, Greg Kroah-Hartman, linux, linux-iio,
linux-staging, linux-kernel
On Sun, Oct 11, 2026 at 07:56:22PM +0100, Raffaele Tranfaglia via B4 Relay wrote:
> From: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
>
> Use dev_err_probe() when requesting the ldac GPIO fails. This
> avoids logging an error when the GPIO controller is not ready yet
> and the request returns -EPROBE_DEFER, and records the deferral
> reason. It also simplifies the error path.
>
> Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
> ---
> Compile-tested only.
> ---
Not sure what's Jonathan policy in here (or don't remember :)).
Personally, I don't see much benefit on this kind of patches. I'm aware
you might be eager to have something upstream but for staging I guess
the real value is in having someone willing to really cleanup the driver
so that we can take it out of staging (naturally that also means having
HW or someone willing to test it).
- Nuno Sá
> drivers/staging/iio/addac/adt7316.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
> index 20f6052cc7fb..8ca6def84584 100644
> --- a/drivers/staging/iio/addac/adt7316.c
> +++ b/drivers/staging/iio/addac/adt7316.c
> @@ -2142,11 +2142,9 @@ int adt7316_probe(struct device *dev, struct adt7316_bus *bus,
>
> chip->ldac_pin = devm_gpiod_get_optional(dev, "adi,ldac",
> GPIOD_OUT_LOW);
> - if (IS_ERR(chip->ldac_pin)) {
> - ret = PTR_ERR(chip->ldac_pin);
> - dev_err(dev, "Failed to request ldac GPIO: %d\n", ret);
> - return ret;
> - }
> + if (IS_ERR(chip->ldac_pin))
> + return dev_err_probe(dev, PTR_ERR(chip->ldac_pin),
> + "Failed to request ldac GPIO\n");
>
> if (!chip->ldac_pin) {
> chip->config3 |= ADT7316_DA_EN_VIA_DAC_LDAC;
>
> ---
> base-commit: a22dc7ebb21a6bd4c8b63bc2c1dd46a24945aae7
> change-id: 20261011-adt7316-dev-err-probe-8ffb5e224100
>
> Best regards,
> --
> Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
2026-10-12 14:35 ` Nuno Sá
@ 2026-10-12 21:27 ` Andy Shevchenko
0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-10-12 21:27 UTC (permalink / raw)
To: Nuno Sá
Cc: raffaele.tranfaglia, Michael Hennerich, Jonathan Cameron,
David Lechner, Andy Shevchenko, Greg Kroah-Hartman, linux,
linux-iio, linux-staging, linux-kernel
On Mon, Oct 12, 2026 at 03:35:30PM +0100, Nuno Sá wrote:
> On Sun, Oct 11, 2026 at 07:56:22PM +0100, Raffaele Tranfaglia via B4 Relay wrote:
> > Use dev_err_probe() when requesting the ldac GPIO fails. This
> > avoids logging an error when the GPIO controller is not ready yet
> > and the request returns -EPROBE_DEFER, and records the deferral
> > reason. It also simplifies the error path.
> Not sure what's Jonathan policy in here (or don't remember :)).
> Personally, I don't see much benefit on this kind of patches. I'm aware
> you might be eager to have something upstream but for staging I guess
> the real value is in having someone willing to really cleanup the driver
> so that we can take it out of staging (naturally that also means having
> HW or someone willing to test it).
This is a real fix for a (rare enough) problem. Without this it's possible
to get your dmesg flooded with the messages instead of the useful logs, so
I'm definitely in favour of taking it.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
2026-10-11 18:56 ` Raffaele Tranfaglia
(?)
(?)
@ 2026-10-12 21:28 ` Andy Shevchenko
2026-10-13 7:50 ` Joshua Crofts
-1 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2026-10-12 21:28 UTC (permalink / raw)
To: raffaele.tranfaglia
Cc: Nuno Sá, Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko, Greg Kroah-Hartman, linux, linux-iio,
linux-staging, linux-kernel
On Sun, Oct 11, 2026 at 07:56:22PM +0100, Raffaele Tranfaglia via B4 Relay wrote:
> Use dev_err_probe() when requesting the ldac GPIO fails. This
> avoids logging an error when the GPIO controller is not ready yet
> and the request returns -EPROBE_DEFER, and records the deferral
> reason. It also simplifies the error path.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Although not sure if we need a Fixes tag as it might be an annoying (but quite
rare) case of flooding in the dmesg.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
2026-10-12 21:28 ` Andy Shevchenko
@ 2026-10-13 7:50 ` Joshua Crofts
2026-10-13 8:54 ` Andy Shevchenko
0 siblings, 1 reply; 7+ messages in thread
From: Joshua Crofts @ 2026-10-13 7:50 UTC (permalink / raw)
To: Andy Shevchenko
Cc: raffaele.tranfaglia, Nuno Sá, Michael Hennerich,
Jonathan Cameron, David Lechner, Andy Shevchenko,
Greg Kroah-Hartman, linux, linux-iio, linux-staging, linux-kernel
On Tue, 13 Oct 2026 00:28:25 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Sun, Oct 11, 2026 at 07:56:22PM +0100, Raffaele Tranfaglia via B4 Relay wrote:
>
> > Use dev_err_probe() when requesting the ldac GPIO fails. This
> > avoids logging an error when the GPIO controller is not ready yet
> > and the request returns -EPROBE_DEFER, and records the deferral
> > reason. It also simplifies the error path.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>
> Although not sure if we need a Fixes tag as it might be an annoying (but quite
> rare) case of flooding in the dmesg.
AFAIC this is a cleanup rather than a fix. dev_err_probe() conversions
don't add Fixes tags.
--
Kind regards,
Joshua Crofts
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
2026-10-13 7:50 ` Joshua Crofts
@ 2026-10-13 8:54 ` Andy Shevchenko
0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-10-13 8:54 UTC (permalink / raw)
To: Joshua Crofts
Cc: raffaele.tranfaglia, Nuno Sá, Michael Hennerich,
Jonathan Cameron, David Lechner, Andy Shevchenko,
Greg Kroah-Hartman, linux, linux-iio, linux-staging, linux-kernel
On Tue, Oct 13, 2026 at 09:50:07AM +0200, Joshua Crofts wrote:
> On Tue, 13 Oct 2026 00:28:25 +0300
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > On Sun, Oct 11, 2026 at 07:56:22PM +0100, Raffaele Tranfaglia via B4 Relay wrote:
> >
> > > Use dev_err_probe() when requesting the ldac GPIO fails. This
> > > avoids logging an error when the GPIO controller is not ready yet
> > > and the request returns -EPROBE_DEFER, and records the deferral
> > > reason. It also simplifies the error path.
> >
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> >
> > Although not sure if we need a Fixes tag as it might be an annoying (but quite
> > rare) case of flooding in the dmesg.
>
> AFAIC this is a cleanup rather than a fix. dev_err_probe() conversions
> don't add Fixes tags.
I think it depends if one sees that problem IRL (see below examples),
but I am fine with or without Fixes tag for this.
59b991990a04 ("spi: hisi-kunpeng: Use dev_err_probe() for host registration failure")
5ff5505b9a2d ("drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found")
ad1abe476995 ("power: supply: cw2015: use dev_err_probe to allow deferred probe")
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-10-13 8:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-11 18:56 [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO Raffaele Tranfaglia via B4 Relay
2026-10-11 18:56 ` Raffaele Tranfaglia
2026-10-12 14:35 ` Nuno Sá
2026-10-12 21:27 ` Andy Shevchenko
2026-10-12 21:28 ` Andy Shevchenko
2026-10-13 7:50 ` Joshua Crofts
2026-10-13 8:54 ` Andy Shevchenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.