From: David Lechner <dlechner@baylibre.com>
To: nuno.sa@analog.com, linux-iio@vger.kernel.org
Cc: Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>,
Andy Shevchenko <andy@kernel.org>
Subject: Re: [PATCH 1/2] iio: dac: adi-axi-dac: Make use of dev_err_probe()
Date: Wed, 3 Dec 2025 10:06:33 -0600 [thread overview]
Message-ID: <07439e95-47f5-434a-9f6d-d7740375a3d6@baylibre.com> (raw)
In-Reply-To: <20251203-iio-axi-dac-minor-changes-v1-1-b54650cbeb33@analog.com>
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 */
>
next prev parent reply other threads:[~2025-12-03 16:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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á
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07439e95-47f5-434a-9f6d-d7740375a3d6@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox