From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
To: Tomas Borquez <tomasborquez13@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: Re: [PATCH 3/5] staging: iio: ad9832: cleanup dev_err_probe()
Date: Thu, 18 Dec 2025 11:38:54 -0300 [thread overview]
Message-ID: <aUQR_vBHQwg9CWFn@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <20251215190806.11003-4-tomasborquez13@gmail.com>
On 12/15, Tomas Borquez wrote:
> Cleanup dev_err_probe() by keeping messages consistent and adding
> error message for clock acquisition failure.
This is also a clean-up patch while patch 2 is a driver update so I would
provide this patch (currently patch 3) before the patch updating to use guard().
>
> Signed-off-by: Tomas Borquez <tomasborquez13@gmail.com>
> ---
> drivers/staging/iio/frequency/ad9832.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> index f9ef3aede4..8d04f1b44f 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -302,15 +302,15 @@ static int ad9832_probe(struct spi_device *spi)
>
> ret = devm_regulator_get_enable(&spi->dev, "avdd");
> if (ret)
> - return dev_err_probe(&spi->dev, ret, "failed to enable specified AVDD voltage\n");
> + return dev_err_probe(&spi->dev, ret, "failed to enable AVDD supply\n");
I'd break the lines and write the message in the line below for this and other
dev_err_probe() that exceed 80 columns. E.g.
return dev_err_probe(&spi->dev, ret,
"failed to enable AVDD supply\n");
Note this is just a personal preference of mine, not enforced code style, so
fine if you prefer keep it as it is.
>
> ret = devm_regulator_get_enable(&spi->dev, "dvdd");
> if (ret)
> - return dev_err_probe(&spi->dev, ret, "Failed to enable specified DVDD supply\n");
> + return dev_err_probe(&spi->dev, ret, "failed to enable DVDD supply\n");
>
> st->mclk = devm_clk_get_enabled(&spi->dev, "mclk");
> if (IS_ERR(st->mclk))
> - return PTR_ERR(st->mclk);
> + return dev_err_probe(&spi->dev, PTR_ERR(st->mclk), "failed to enable MCLK\n");
>
> st->spi = spi;
> mutex_init(&st->lock);
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2025-12-18 14:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 19:08 [PATCH 0/5] staging: ad9832: driver cleanup Tomas Borquez
2025-12-15 19:08 ` [PATCH 1/5] staging: iio: ad9832: clean up whitespace Tomas Borquez
2025-12-18 14:27 ` Marcelo Schmitt
2025-12-21 19:17 ` Jonathan Cameron
2025-12-15 19:08 ` [PATCH 2/5] staging: iio: ad9832: convert to guard(mutex) Tomas Borquez
2025-12-18 14:34 ` Marcelo Schmitt
2025-12-18 15:16 ` Tomas Borquez
2025-12-21 19:22 ` Jonathan Cameron
2025-12-15 19:08 ` [PATCH 3/5] staging: iio: ad9832: cleanup dev_err_probe() Tomas Borquez
2025-12-18 14:38 ` Marcelo Schmitt [this message]
2025-12-21 19:25 ` Jonathan Cameron
2025-12-15 19:08 ` [PATCH 4/5] staging: iio: ad9832: convert to iio channels and ext_info attrs Tomas Borquez
2025-12-18 15:04 ` Marcelo Schmitt
2025-12-18 15:46 ` Tomas Borquez
2025-12-21 19:36 ` Jonathan Cameron
2025-12-15 19:08 ` [PATCH 5/5] staging: iio: ad9832: add sysfs documentation Tomas Borquez
2025-12-18 15:10 ` Marcelo Schmitt
2025-12-21 19:43 ` 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=aUQR_vBHQwg9CWFn@debian-BULLSEYE-live-builder-AMD64 \
--to=marcelo.schmitt1@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=nuno.sa@analog.com \
--cc=tomasborquez13@gmail.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