Linux Watchdog driver development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: wim@linux-watchdog.org, support.opensource@diasemi.com,
	linux-watchdog@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v2 1/2] watchdog: da9063: rename helper function to avoid misunderstandings
Date: Mon, 4 Jun 2018 12:24:56 -0700	[thread overview]
Message-ID: <20180604192456.GA19408@roeck-us.net> (raw)
In-Reply-To: <20180604150059.8602-2-m.felsch@pengutronix.de>

On Mon, Jun 04, 2018 at 05:00:58PM +0200, Marco Felsch wrote:
> _da9063_wdt_set_timeout() is called by da9063_wdg_set_timeout(),
> da9063_wdg_start() and da9063_wdg_probe() but the name expect only to be
> called by da9063_wdg_set_timeout(). Rename the function to avoid
> misunderstandings.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/da9063_wdt.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
> index a4380a887e85..760aa9bca81b 100644
> --- a/drivers/watchdog/da9063_wdt.c
> +++ b/drivers/watchdog/da9063_wdt.c
> @@ -64,7 +64,7 @@ static int da9063_wdt_disable_timer(struct da9063 *da9063)
>  				  DA9063_TWDSCALE_DISABLE);
>  }
>  
> -static int _da9063_wdt_set_timeout(struct da9063 *da9063, unsigned int regval)
> +static int da9063_wdt_update_timeout(struct da9063 *da9063, unsigned int regval)
>  {
>  	int ret;
>  
> @@ -93,7 +93,7 @@ static int da9063_wdt_start(struct watchdog_device *wdd)
>  	int ret;
>  
>  	selector = da9063_wdt_timeout_to_sel(wdd->timeout);
> -	ret = _da9063_wdt_set_timeout(da9063, selector);
> +	ret = da9063_wdt_update_timeout(da9063, selector);
>  	if (ret)
>  		dev_err(da9063->dev, "Watchdog failed to start (err = %d)\n",
>  			ret);
> @@ -148,7 +148,7 @@ static int da9063_wdt_set_timeout(struct watchdog_device *wdd,
>  	 * enabling the watchdog, so the timeout must be buffered by the driver.
>  	 */
>  	if (watchdog_active(wdd))
> -		ret = _da9063_wdt_set_timeout(da9063, selector);
> +		ret = da9063_wdt_update_timeout(da9063, selector);
>  
>  	if (ret)
>  		dev_err(da9063->dev, "Failed to set watchdog timeout (err = %d)\n",
> @@ -223,7 +223,7 @@ static int da9063_wdt_probe(struct platform_device *pdev)
>  		unsigned int timeout;
>  
>  		timeout = da9063_wdt_timeout_to_sel(DA9063_WDG_TIMEOUT);
> -		_da9063_wdt_set_timeout(da9063, timeout);
> +		da9063_wdt_update_timeout(da9063, timeout);
>  		set_bit(WDOG_HW_RUNNING, &wdd->status);
>  	}
>  
> -- 
> 2.17.1
> 

  reply	other threads:[~2018-06-04 19:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 15:00 [PATCH v2 0/2] watchdog: da9063: small improvements Marco Felsch
2018-06-04 15:00 ` [PATCH v2 1/2] watchdog: da9063: rename helper function to avoid misunderstandings Marco Felsch
2018-06-04 19:24   ` Guenter Roeck [this message]
2018-06-05 12:38   ` Steve Twiss
2018-06-04 15:00 ` [PATCH v2 2/2] watchdog: da9063: remove duplicated timeout_to_sel calls Marco Felsch
2018-06-04 19:25   ` Guenter Roeck
2018-06-05 12:38   ` Steve Twiss

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=20180604192456.GA19408@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=support.opensource@diasemi.com \
    --cc=wim@linux-watchdog.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