Linux Watchdog driver development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: linux-watchdog@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [PATCH] watchdog: indydog: Simplify indydog_{start,stop}
Date: Sat, 15 Feb 2014 09:44:55 -0800	[thread overview]
Message-ID: <20140215174455.GC19001@roeck-us.net> (raw)
In-Reply-To: <1392456111-29962-1-git-send-email-shc_work@mail.ru>

On Sat, Feb 15, 2014 at 01:21:51PM +0400, Alexander Shiyan wrote:
> This patch simplify functions indydog_start() and indydog_stop()
> a bit and removes excess intermediate variable.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

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

> ---
>  drivers/watchdog/indydog.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c
> index 1b5c25a..5d20cdd 100644
> --- a/drivers/watchdog/indydog.c
> +++ b/drivers/watchdog/indydog.c
> @@ -41,24 +41,15 @@ MODULE_PARM_DESC(nowayout,
>  
>  static void indydog_start(void)
>  {
> -	u32 mc_ctrl0;
> -
>  	spin_lock(&indydog_lock);
> -	mc_ctrl0 = sgimc->cpuctrl0;
> -	mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
> -	sgimc->cpuctrl0 = mc_ctrl0;
> +	sgimc->cpuctrl0 |= SGIMC_CCTRL0_WDOG;
>  	spin_unlock(&indydog_lock);
>  }
>  
>  static void indydog_stop(void)
>  {
> -	u32 mc_ctrl0;
> -
>  	spin_lock(&indydog_lock);
> -
> -	mc_ctrl0 = sgimc->cpuctrl0;
> -	mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
> -	sgimc->cpuctrl0 = mc_ctrl0;
> +	sgimc->cpuctrl0 &= ~SGIMC_CCTRL0_WDOG;
>  	spin_unlock(&indydog_lock);
>  
>  	pr_info("Stopped watchdog timer\n");
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2014-02-15 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15  9:21 [PATCH] watchdog: indydog: Simplify indydog_{start,stop} Alexander Shiyan
2014-02-15 17:44 ` Guenter Roeck [this message]
2014-02-24 19:58 ` Wim Van Sebroeck

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=20140215174455.GC19001@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=shc_work@mail.ru \
    --cc=wim@iguana.be \
    /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