* [PATCH 0/2] iio: dac: adi-axi-dac: Minor cleanups
@ 2025-12-03 15:53 Nuno Sá via B4 Relay
2025-12-03 15:53 ` [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe() Nuno Sá via B4 Relay
2025-12-03 15:53 ` [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg() Nuno Sá via B4 Relay
0 siblings, 2 replies; 11+ messages in thread
From: Nuno Sá via B4 Relay @ 2025-12-03 15:53 UTC (permalink / raw)
To: linux-iio
Cc: Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko
Small series to use dev_err_probe() and turn dev_info() into dev_dbg()
---
Nuno Sá (2):
iio: dac: adi-axi-dac: Make use of dev_err_probe()
iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg()
drivers/iio/dac/adi-axi-dac.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
---
base-commit: f9e05791642810a0cf6237d39fafd6fec5e0b4bb
change-id: 20251203-iio-axi-dac-minor-changes-945fa5f2e1eb
--
Thanks!
- Nuno Sá
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe()
2025-12-03 15:53 [PATCH 0/2] iio: dac: adi-axi-dac: Minor cleanups Nuno Sá via B4 Relay
@ 2025-12-03 15:53 ` Nuno Sá via B4 Relay
2025-12-03 16:06 ` David Lechner
2025-12-03 15:53 ` [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg() Nuno Sá via B4 Relay
1 sibling, 1 reply; 11+ messages in thread
From: Nuno Sá via B4 Relay @ 2025-12-03 15:53 UTC (permalink / raw)
To: linux-iio
Cc: Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko
From: Nuno Sá <nuno.sa@analog.com>
Be consistent and use dev_err_probe() as in all other places in the
.probe() path.
While at it, remove the line break in the version condition. Yes, it
goes over the 80 column limit but I do think the line break hurts
readability in this case.
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
drivers/iio/dac/adi-axi-dac.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
index 0d525272a8a8..0c7b62f5357d 100644
--- a/drivers/iio/dac/adi-axi-dac.c
+++ b/drivers/iio/dac/adi-axi-dac.c
@@ -942,17 +942,15 @@ static int axi_dac_probe(struct platform_device *pdev)
if (ret)
return ret;
- if (ADI_AXI_PCORE_VER_MAJOR(ver) !=
- ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
- dev_err(&pdev->dev,
- "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
- ADI_AXI_PCORE_VER_MAJOR(st->info->version),
- ADI_AXI_PCORE_VER_MINOR(st->info->version),
- ADI_AXI_PCORE_VER_PATCH(st->info->version),
- ADI_AXI_PCORE_VER_MAJOR(ver),
- ADI_AXI_PCORE_VER_MINOR(ver),
- ADI_AXI_PCORE_VER_PATCH(ver));
- return -ENODEV;
+ if (ADI_AXI_PCORE_VER_MAJOR(ver) != ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
+ return dev_err_probe(&pdev->dev, -ENODEV,
+ "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
+ ADI_AXI_PCORE_VER_MAJOR(st->info->version),
+ ADI_AXI_PCORE_VER_MINOR(st->info->version),
+ ADI_AXI_PCORE_VER_PATCH(st->info->version),
+ ADI_AXI_PCORE_VER_MAJOR(ver),
+ ADI_AXI_PCORE_VER_MINOR(ver),
+ ADI_AXI_PCORE_VER_PATCH(ver));
}
/* Let's get the core read only configuration */
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg()
2025-12-03 15:53 [PATCH 0/2] iio: dac: adi-axi-dac: Minor cleanups Nuno Sá via B4 Relay
2025-12-03 15:53 ` [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe() Nuno Sá via B4 Relay
@ 2025-12-03 15:53 ` Nuno Sá via B4 Relay
2025-12-03 16:05 ` David Lechner
1 sibling, 1 reply; 11+ messages in thread
From: Nuno Sá via B4 Relay @ 2025-12-03 15:53 UTC (permalink / raw)
To: linux-iio
Cc: Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko
From: Nuno Sá <nuno.sa@analog.com>
We should not abuse logging and logging a successful probe is clearly
abuse. Turn it into dev_dbg().
If it turns out the IP version is that relevant we can make it easy to
get through a new debugfs interface later on.
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
drivers/iio/dac/adi-axi-dac.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
index 0c7b62f5357d..f536158beb4c 100644
--- a/drivers/iio/dac/adi-axi-dac.c
+++ b/drivers/iio/dac/adi-axi-dac.c
@@ -1000,10 +1000,10 @@ static int axi_dac_probe(struct platform_device *pdev)
"cannot create device.");
}
- dev_info(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
- ADI_AXI_PCORE_VER_MAJOR(ver),
- ADI_AXI_PCORE_VER_MINOR(ver),
- ADI_AXI_PCORE_VER_PATCH(ver));
+ dev_dbg(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
+ ADI_AXI_PCORE_VER_MAJOR(ver),
+ ADI_AXI_PCORE_VER_MINOR(ver),
+ ADI_AXI_PCORE_VER_PATCH(ver));
return 0;
}
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg()
2025-12-03 15:53 ` [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg() Nuno Sá via B4 Relay
@ 2025-12-03 16:05 ` David Lechner
2025-12-03 16:10 ` Nuno Sá
0 siblings, 1 reply; 11+ messages in thread
From: David Lechner @ 2025-12-03 16:05 UTC (permalink / raw)
To: nuno.sa, linux-iio; +Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
> From: Nuno Sá <nuno.sa@analog.com>
>
> We should not abuse logging and logging a successful probe is clearly
> abuse. Turn it into dev_dbg().
>
> If it turns out the IP version is that relevant we can make it easy to
> get through a new debugfs interface later on.
>
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
> drivers/iio/dac/adi-axi-dac.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
> index 0c7b62f5357d..f536158beb4c 100644
> --- a/drivers/iio/dac/adi-axi-dac.c
> +++ b/drivers/iio/dac/adi-axi-dac.c
> @@ -1000,10 +1000,10 @@ static int axi_dac_probe(struct platform_device *pdev)
> "cannot create device.");
> }
>
> - dev_info(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
> - ADI_AXI_PCORE_VER_MAJOR(ver),
> - ADI_AXI_PCORE_VER_MINOR(ver),
> - ADI_AXI_PCORE_VER_PATCH(ver));
> + dev_dbg(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
Didn't ADI HDL versioning policy change to semver so that the last number
is no longer necessarily an ASCII character?
We could probably change this to %d.%.d.%d while here.
> + ADI_AXI_PCORE_VER_MAJOR(ver),
> + ADI_AXI_PCORE_VER_MINOR(ver),
> + ADI_AXI_PCORE_VER_PATCH(ver));
>
> return 0;
> }
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe()
2025-12-03 15:53 ` [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe() Nuno Sá via B4 Relay
@ 2025-12-03 16:06 ` David Lechner
2025-12-03 16:29 ` Nuno Sá
0 siblings, 1 reply; 11+ messages in thread
From: David Lechner @ 2025-12-03 16:06 UTC (permalink / raw)
To: nuno.sa, linux-iio; +Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
> From: Nuno Sá <nuno.sa@analog.com>
>
> Be consistent and use dev_err_probe() as in all other places in the
> .probe() path.
>
> While at it, remove the line break in the version condition. Yes, it
> goes over the 80 column limit but I do think the line break hurts
> readability in this case.
>
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
> drivers/iio/dac/adi-axi-dac.c | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
> index 0d525272a8a8..0c7b62f5357d 100644
> --- a/drivers/iio/dac/adi-axi-dac.c
> +++ b/drivers/iio/dac/adi-axi-dac.c
> @@ -942,17 +942,15 @@ static int axi_dac_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - if (ADI_AXI_PCORE_VER_MAJOR(ver) !=
> - ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
> - dev_err(&pdev->dev,
> - "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
> - ADI_AXI_PCORE_VER_MAJOR(st->info->version),
> - ADI_AXI_PCORE_VER_MINOR(st->info->version),
> - ADI_AXI_PCORE_VER_PATCH(st->info->version),
> - ADI_AXI_PCORE_VER_MAJOR(ver),
> - ADI_AXI_PCORE_VER_MINOR(ver),
> - ADI_AXI_PCORE_VER_PATCH(ver));
> - return -ENODEV;
> + if (ADI_AXI_PCORE_VER_MAJOR(ver) != ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
Can drop the braces now.
> + return dev_err_probe(&pdev->dev, -ENODEV,
> + "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
> + ADI_AXI_PCORE_VER_MAJOR(st->info->version),
> + ADI_AXI_PCORE_VER_MINOR(st->info->version),
> + ADI_AXI_PCORE_VER_PATCH(st->info->version),
> + ADI_AXI_PCORE_VER_MAJOR(ver),
> + ADI_AXI_PCORE_VER_MINOR(ver),
> + ADI_AXI_PCORE_VER_PATCH(ver));
> }
>
> /* Let's get the core read only configuration */
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg()
2025-12-03 16:05 ` David Lechner
@ 2025-12-03 16:10 ` Nuno Sá
2025-12-03 16:14 ` David Lechner
0 siblings, 1 reply; 11+ messages in thread
From: Nuno Sá @ 2025-12-03 16:10 UTC (permalink / raw)
To: David Lechner, nuno.sa, linux-iio
Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
On Wed, 2025-12-03 at 10:05 -0600, David Lechner wrote:
> On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
> > From: Nuno Sá <nuno.sa@analog.com>
> >
> > We should not abuse logging and logging a successful probe is clearly
> > abuse. Turn it into dev_dbg().
> >
> > If it turns out the IP version is that relevant we can make it easy to
> > get through a new debugfs interface later on.
> >
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> > drivers/iio/dac/adi-axi-dac.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
> > index 0c7b62f5357d..f536158beb4c 100644
> > --- a/drivers/iio/dac/adi-axi-dac.c
> > +++ b/drivers/iio/dac/adi-axi-dac.c
> > @@ -1000,10 +1000,10 @@ static int axi_dac_probe(struct platform_device *pdev)
> > "cannot create device.");
> > }
> >
> > - dev_info(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
> > - ADI_AXI_PCORE_VER_MAJOR(ver),
> > - ADI_AXI_PCORE_VER_MINOR(ver),
> > - ADI_AXI_PCORE_VER_PATCH(ver));
> > + dev_dbg(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
>
> Didn't ADI HDL versioning policy change to semver so that the last number
> is no longer necessarily an ASCII character?
>
> We could probably change this to %d.%.d.%d while here.
Honestly, I'm not sure how that settled up. I'll check and if that's the case I can change it.
But then it will be a bit messy with older IPs. Maybe moving this into debugfs and handle the format
there would make sense.
- Nuno Sá
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg()
2025-12-03 16:10 ` Nuno Sá
@ 2025-12-03 16:14 ` David Lechner
2025-12-03 16:17 ` Andy Shevchenko
2025-12-03 16:31 ` Nuno Sá
0 siblings, 2 replies; 11+ messages in thread
From: David Lechner @ 2025-12-03 16:14 UTC (permalink / raw)
To: Nuno Sá, nuno.sa, linux-iio
Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
On 12/3/25 10:10 AM, Nuno Sá wrote:
> On Wed, 2025-12-03 at 10:05 -0600, David Lechner wrote:
>> On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
>>> From: Nuno Sá <nuno.sa@analog.com>
>>>
>>> We should not abuse logging and logging a successful probe is clearly
>>> abuse. Turn it into dev_dbg().
>>>
>>> If it turns out the IP version is that relevant we can make it easy to
>>> get through a new debugfs interface later on.
>>>
>>> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
>>> ---
>>> drivers/iio/dac/adi-axi-dac.c | 8 ++++----
>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
>>> index 0c7b62f5357d..f536158beb4c 100644
>>> --- a/drivers/iio/dac/adi-axi-dac.c
>>> +++ b/drivers/iio/dac/adi-axi-dac.c
>>> @@ -1000,10 +1000,10 @@ static int axi_dac_probe(struct platform_device *pdev)
>>> "cannot create device.");
>>> }
>>>
>>> - dev_info(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
>>> - ADI_AXI_PCORE_VER_MAJOR(ver),
>>> - ADI_AXI_PCORE_VER_MINOR(ver),
>>> - ADI_AXI_PCORE_VER_PATCH(ver));
>>> + dev_dbg(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
>>
>> Didn't ADI HDL versioning policy change to semver so that the last number
>> is no longer necessarily an ASCII character?
>>
>> We could probably change this to %d.%.d.%d while here.
>
> Honestly, I'm not sure how that settled up. I'll check and if that's the case I can change it.
> But then it will be a bit messy with older IPs. Maybe moving this into debugfs and handle the format
> there would make sense.
>
> - Nuno Sá
>
>>
If it was still an ASCII value, it would just look like an unusually
high bug fix number, but I don't think that hurts much. I don't think
we need to go as far as changing it to debugfs. It should be pretty
obvious if that is the case and people can figure out how to convert
the number to a character.
The dev_err_probe() function in the previous patch in this series
also has the same issue.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg()
2025-12-03 16:14 ` David Lechner
@ 2025-12-03 16:17 ` Andy Shevchenko
2025-12-03 16:31 ` Nuno Sá
1 sibling, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2025-12-03 16:17 UTC (permalink / raw)
To: David Lechner
Cc: Nuno Sá, nuno.sa, linux-iio, Michael Hennerich,
Jonathan Cameron, Andy Shevchenko
On Wed, Dec 03, 2025 at 10:14:41AM -0600, David Lechner wrote:
> On 12/3/25 10:10 AM, Nuno Sá wrote:
> > On Wed, 2025-12-03 at 10:05 -0600, David Lechner wrote:
> >> On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
...
> >>> - dev_info(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
> >>> - ADI_AXI_PCORE_VER_MAJOR(ver),
> >>> - ADI_AXI_PCORE_VER_MINOR(ver),
> >>> - ADI_AXI_PCORE_VER_PATCH(ver));
> >>> + dev_dbg(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
> >>
> >> Didn't ADI HDL versioning policy change to semver so that the last number
> >> is no longer necessarily an ASCII character?
> >>
> >> We could probably change this to %d.%.d.%d while here.
I believe you don't want %.d and it was just a typo.
> > Honestly, I'm not sure how that settled up. I'll check and if that's the case I can change it.
> > But then it will be a bit messy with older IPs. Maybe moving this into debugfs and handle the format
> > there would make sense.
>
> If it was still an ASCII value, it would just look like an unusually
> high bug fix number, but I don't think that hurts much. I don't think
> we need to go as far as changing it to debugfs. It should be pretty
> obvious if that is the case and people can figure out how to convert
> the number to a character.
One can always use a %pE for that. But if version grows up to printable
character... this all become screwed.
> The dev_err_probe() function in the previous patch in this series
> also has the same issue.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe()
2025-12-03 16:06 ` David Lechner
@ 2025-12-03 16:29 ` Nuno Sá
2025-12-07 17:33 ` David Lechner
0 siblings, 1 reply; 11+ messages in thread
From: Nuno Sá @ 2025-12-03 16:29 UTC (permalink / raw)
To: David Lechner, nuno.sa, linux-iio
Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
On Wed, 2025-12-03 at 10:06 -0600, David Lechner wrote:
> On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
> > From: Nuno Sá <nuno.sa@analog.com>
> >
> > Be consistent and use dev_err_probe() as in all other places in the
> > .probe() path.
> >
> > While at it, remove the line break in the version condition. Yes, it
> > goes over the 80 column limit but I do think the line break hurts
> > readability in this case.
> >
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> > drivers/iio/dac/adi-axi-dac.c | 20 +++++++++-----------
> > 1 file changed, 9 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
> > index 0d525272a8a8..0c7b62f5357d 100644
> > --- a/drivers/iio/dac/adi-axi-dac.c
> > +++ b/drivers/iio/dac/adi-axi-dac.c
> > @@ -942,17 +942,15 @@ static int axi_dac_probe(struct platform_device *pdev)
> > if (ret)
> > return ret;
> >
> > - if (ADI_AXI_PCORE_VER_MAJOR(ver) !=
> > - ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
> > - dev_err(&pdev->dev,
> > - "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
> > - ADI_AXI_PCORE_VER_MAJOR(st->info->version),
> > - ADI_AXI_PCORE_VER_MINOR(st->info->version),
> > - ADI_AXI_PCORE_VER_PATCH(st->info->version),
> > - ADI_AXI_PCORE_VER_MAJOR(ver),
> > - ADI_AXI_PCORE_VER_MINOR(ver),
> > - ADI_AXI_PCORE_VER_PATCH(ver));
> > - return -ENODEV;
> > + if (ADI_AXI_PCORE_VER_MAJOR(ver) != ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
>
> Can drop the braces now.
Yes, I thought about it but then kept the braces as we still have "multiple" lines (note checkpatch
does not complain in cases like this).
But I don't feel strong about it so can drop them if you do :)
- Nuno Sá
>
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg()
2025-12-03 16:14 ` David Lechner
2025-12-03 16:17 ` Andy Shevchenko
@ 2025-12-03 16:31 ` Nuno Sá
1 sibling, 0 replies; 11+ messages in thread
From: Nuno Sá @ 2025-12-03 16:31 UTC (permalink / raw)
To: David Lechner, nuno.sa, linux-iio
Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
On Wed, 2025-12-03 at 10:14 -0600, David Lechner wrote:
> On 12/3/25 10:10 AM, Nuno Sá wrote:
> > On Wed, 2025-12-03 at 10:05 -0600, David Lechner wrote:
> > > On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
> > > > From: Nuno Sá <nuno.sa@analog.com>
> > > >
> > > > We should not abuse logging and logging a successful probe is clearly
> > > > abuse. Turn it into dev_dbg().
> > > >
> > > > If it turns out the IP version is that relevant we can make it easy to
> > > > get through a new debugfs interface later on.
> > > >
> > > > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > > > ---
> > > > drivers/iio/dac/adi-axi-dac.c | 8 ++++----
> > > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
> > > > index 0c7b62f5357d..f536158beb4c 100644
> > > > --- a/drivers/iio/dac/adi-axi-dac.c
> > > > +++ b/drivers/iio/dac/adi-axi-dac.c
> > > > @@ -1000,10 +1000,10 @@ static int axi_dac_probe(struct platform_device *pdev)
> > > > "cannot create device.");
> > > > }
> > > >
> > > > - dev_info(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
> > > > - ADI_AXI_PCORE_VER_MAJOR(ver),
> > > > - ADI_AXI_PCORE_VER_MINOR(ver),
> > > > - ADI_AXI_PCORE_VER_PATCH(ver));
> > > > + dev_dbg(&pdev->dev, "AXI DAC IP core (%d.%.2d.%c) probed\n",
> > >
> > > Didn't ADI HDL versioning policy change to semver so that the last number
> > > is no longer necessarily an ASCII character?
> > >
> > > We could probably change this to %d.%.d.%d while here.
> >
> > Honestly, I'm not sure how that settled up. I'll check and if that's the case I can change it.
> > But then it will be a bit messy with older IPs. Maybe moving this into debugfs and handle the
> > format
> > there would make sense.
> >
> > - Nuno Sá
> >
> > >
>
> If it was still an ASCII value, it would just look like an unusually
> high bug fix number, but I don't think that hurts much. I don't think
> we need to go as far as changing it to debugfs. It should be pretty
> obvious if that is the case and people can figure out how to convert
> the number to a character.
>
Alright, but (unlike the spi_engine) it seems this core is still using the old format [1].
> The dev_err_probe() function in the previous patch in this series
> also has the same issue.
Right!
[1]: https://github.com/analogdevicesinc/hdl/blob/main/library/common/up_dac_common.v#L128
- Nuno Sá
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe()
2025-12-03 16:29 ` Nuno Sá
@ 2025-12-07 17:33 ` David Lechner
0 siblings, 0 replies; 11+ messages in thread
From: David Lechner @ 2025-12-07 17:33 UTC (permalink / raw)
To: Nuno Sá, nuno.sa, linux-iio
Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
On 12/3/25 10:29 AM, Nuno Sá wrote:
> On Wed, 2025-12-03 at 10:06 -0600, David Lechner wrote:
>> On 12/3/25 9:53 AM, Nuno Sá via B4 Relay wrote:
>>> From: Nuno Sá <nuno.sa@analog.com>
>>>
>>> Be consistent and use dev_err_probe() as in all other places in the
>>> .probe() path.
>>>
>>> While at it, remove the line break in the version condition. Yes, it
>>> goes over the 80 column limit but I do think the line break hurts
>>> readability in this case.
>>>
>>> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
>>> ---
>>> drivers/iio/dac/adi-axi-dac.c | 20 +++++++++-----------
>>> 1 file changed, 9 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
>>> index 0d525272a8a8..0c7b62f5357d 100644
>>> --- a/drivers/iio/dac/adi-axi-dac.c
>>> +++ b/drivers/iio/dac/adi-axi-dac.c
>>> @@ -942,17 +942,15 @@ static int axi_dac_probe(struct platform_device *pdev)
>>> if (ret)
>>> return ret;
>>>
>>> - if (ADI_AXI_PCORE_VER_MAJOR(ver) !=
>>> - ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
>>> - dev_err(&pdev->dev,
>>> - "Major version mismatch. Expected %d.%.2d.%c, Reported %d.%.2d.%c\n",
>>> - ADI_AXI_PCORE_VER_MAJOR(st->info->version),
>>> - ADI_AXI_PCORE_VER_MINOR(st->info->version),
>>> - ADI_AXI_PCORE_VER_PATCH(st->info->version),
>>> - ADI_AXI_PCORE_VER_MAJOR(ver),
>>> - ADI_AXI_PCORE_VER_MINOR(ver),
>>> - ADI_AXI_PCORE_VER_PATCH(ver));
>>> - return -ENODEV;
>>> + if (ADI_AXI_PCORE_VER_MAJOR(ver) != ADI_AXI_PCORE_VER_MAJOR(st->info->version)) {
>>
>> Can drop the braces now.
>
> Yes, I thought about it but then kept the braces as we still have "multiple" lines (note checkpatch
> does not complain in cases like this).
>
> But I don't feel strong about it so can drop them if you do :)
>
> - Nuno Sá
>>
>>>
No, I don't' feel strongly about it.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-12-07 17:33 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-03 15:53 [PATCH 0/2] iio: dac: adi-axi-dac: Minor cleanups Nuno Sá via B4 Relay
2025-12-03 15:53 ` [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe() Nuno Sá via B4 Relay
2025-12-03 16:06 ` David Lechner
2025-12-03 16:29 ` Nuno Sá
2025-12-07 17:33 ` David Lechner
2025-12-03 15:53 ` [PATCH 2/2] iio: dac: adi-axi-dac: Turn dev_info() into dev_dbg() Nuno Sá via B4 Relay
2025-12-03 16:05 ` David Lechner
2025-12-03 16:10 ` Nuno Sá
2025-12-03 16:14 ` David Lechner
2025-12-03 16:17 ` Andy Shevchenko
2025-12-03 16:31 ` Nuno Sá
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox