From: Ulrich Hecht <uli@fpond.eu>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Linus Walleij <linus.walleij@linaro.org>
Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH] pinctrl: sh-pfc: Use dev_notice_once() instead of open-coding
Date: Wed, 31 Jul 2019 15:26:44 +0200 (CEST) [thread overview]
Message-ID: <404802328.319002.1564579604675@webmail.strato.com> (raw)
In-Reply-To: <20190731132406.17381-1-geert+renesas@glider.be>
> On July 31, 2019 at 3:24 PM Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>
>
> At the time of commit 9a643c9a11259955 ("sh-pfc: Convert message
> printing from pr_* to dev_*"), the dev_*_once() variants didn't exist
> yet, so the once behavior was open-coded.
>
> Since commit e135303bd5bebcd2 ("device: Add dev_<level>_once variants")
> they do, so "revert" to the good practice of using a helper.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> To be queued in sh-pfc-for-v5.4.
>
> drivers/pinctrl/sh-pfc/gpio.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
> index 97c1332c1045739a..64c09aa374ae011f 100644
> --- a/drivers/pinctrl/sh-pfc/gpio.c
> +++ b/drivers/pinctrl/sh-pfc/gpio.c
> @@ -255,18 +255,13 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip)
> #ifdef CONFIG_PINCTRL_SH_FUNC_GPIO
> static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
> {
> - static bool __print_once;
> struct sh_pfc *pfc = gpio_to_pfc(gc);
> unsigned int mark = pfc->info->func_gpios[offset].enum_id;
> unsigned long flags;
> int ret;
>
> - if (!__print_once) {
> - dev_notice(pfc->dev,
> - "Use of GPIO API for function requests is deprecated."
> - " Convert to pinctrl\n");
> - __print_once = true;
> - }
> + dev_notice_once(pfc->dev,
> + "Use of GPIO API for function requests is deprecated, convert to pinctrl\n");
>
> if (mark == 0)
> return -EINVAL;
> --
> 2.17.1
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
CU
Uli
>
next prev parent reply other threads:[~2019-07-31 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 13:24 [PATCH] pinctrl: sh-pfc: Use dev_notice_once() instead of open-coding Geert Uytterhoeven
2019-07-31 13:26 ` Ulrich Hecht [this message]
2019-07-31 18:31 ` Niklas Söderlund
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=404802328.319002.1564579604675@webmail.strato.com \
--to=uli@fpond.eu \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/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