From: "Nuno Sá" <noname.nuno@gmail.com>
To: Trevor Gamblin <tgamblin@baylibre.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: adi-axi-adc: improve probe() error messaging
Date: Fri, 14 Jun 2024 11:11:34 +0200 [thread overview]
Message-ID: <57d4659a5abb63d7c085865059b9d71c40371edd.camel@gmail.com> (raw)
In-Reply-To: <20240613163407.2147884-1-tgamblin@baylibre.com>
On Thu, 2024-06-13 at 12:34 -0400, Trevor Gamblin wrote:
> The current error handling for calls such as devm_clk_get_enabled() in
> the adi-axi-adc probe() function means that, if a property such as
> 'clocks' (for example) is not present in the devicetree when booting a
> kernel with the driver enabled, the resulting error message will be
> vague, e.g.:
>
> > adi_axi_adc 44a00000.backend: probe with driver adi_axi_adc failed with error -2
>
> Change the devm_clk_get_enabled(), devm_regmap_init_mmio(), and
> devm_iio_backend_register() checks to use dev_err_probe() with some
> context for easier debugging.
>
> After the fix:
>
> > adi_axi_adc 44a00000.backend: error -ENOENT: failed to get clock
> > adi_axi_adc 44a00000.backend: probe with driver adi_axi_adc failed with error -2
>
> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
> ---
Somehow feel that in these cases the error log should come from the functions we're
calling but bah... likely not going happen/change:
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
(As a suggestion, you may do similar work in the axi-dac driver)
- Nuno Sá
next prev parent reply other threads:[~2024-06-14 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 16:34 [PATCH] iio: adc: adi-axi-adc: improve probe() error messaging Trevor Gamblin
2024-06-14 9:11 ` Nuno Sá [this message]
2024-06-14 19:18 ` Trevor Gamblin
2024-06-15 10:40 ` Jonathan Cameron
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=57d4659a5abb63d7c085865059b9d71c40371edd.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tgamblin@baylibre.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