From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Subject: Re: [PATCH v1 1/1] iio: dac: stm32-dac: Replace open coded str_enable_disable()
Date: Sat, 18 Jun 2022 16:37:21 +0100 [thread overview]
Message-ID: <20220618163721.1cef64c9@jic23-huawei> (raw)
In-Reply-To: <20220616220023.9894-1-andriy.shevchenko@linux.intel.com>
On Fri, 17 Jun 2022 01:00:23 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> Replace open coded str_enable_disable() in error message in
> stm32_dac_set_enable_state().
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+CC Fabrice.
Looks good + harmless to me, so I'll pick it up now, but still time
for any additional feedback as I'll only push it out for 0-day to poke
at initially.
Applied to the togreg branch of iio.git.
Thanks,
Jonathan
> ---
> drivers/iio/dac/stm32-dac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/dac/stm32-dac.c b/drivers/iio/dac/stm32-dac.c
> index e842c15c674d..315d66648210 100644
> --- a/drivers/iio/dac/stm32-dac.c
> +++ b/drivers/iio/dac/stm32-dac.c
> @@ -14,6 +14,7 @@
> #include <linux/module.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> +#include <linux/string_helpers.h>
>
> #include "stm32-dac-core.h"
>
> @@ -79,8 +80,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
> ret = regmap_update_bits(dac->common->regmap, STM32_DAC_CR, msk, en);
> mutex_unlock(&dac->lock);
> if (ret < 0) {
> - dev_err(&indio_dev->dev, "%s failed\n", en ?
> - "Enable" : "Disable");
> + dev_err(&indio_dev->dev, "%s failed\n", str_enable_disable(en));
> goto err_put_pm;
> }
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-06-18 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 22:00 [PATCH v1 1/1] iio: dac: stm32-dac: Replace open coded str_enable_disable() Andy Shevchenko
2022-06-18 15:37 ` Jonathan Cameron [this message]
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=20220618163721.1cef64c9@jic23-huawei \
--to=jic23@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@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