[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240622190939.7ff46d62@jic23-huawei>
Date: Sat, 22 Jun 2024 19:09:39 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Nuno Sá <noname.nuno@...il.com>
Cc: Trevor Gamblin <tgamblin@...libre.com>, Nuno Sa <nuno.sa@...log.com>,
Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich
<Michael.Hennerich@...log.com>, Angelo Dureghello
<adureghello@...libre.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: dac: adi-axi-dac: improve probe() error messaging
On Tue, 18 Jun 2024 10:34:34 +0200
Nuno Sá <noname.nuno@...il.com> wrote:
> On Mon, 2024-06-17 at 11:18 -0400, Trevor Gamblin wrote:
> > The current error handling for calls such as devm_clk_get_enabled() in
> > the adi-axi-dac 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_dac 44a00000.dac: probe with driver adi_axi_dac 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 change:
> >
> > > adi_axi_dac 44a00000.dac: error -ENOENT: failed to get clock
> > > adi_axi_dac 44a00000.dac: probe with driver adi_axi_dac failed with error -2
> >
> > Suggested-by: Nuno Sa <nuno.sa@...log.com>
> > Tested-by: Angelo Dureghello <adureghello@...libre.com>
> > Signed-off-by: Trevor Gamblin <tgamblin@...libre.com>
> > ---
> > Added Angelo as Tested-by since he tested the patch on an internal
> > setup.
> > ---
>
> Reviewed-by: Nuno Sa <nuno.sa@...log.com>
>
Applied,
Thanks,
Powered by blists - more mailing lists