Re: [PATCH] watchdog: indydog: Simplify indydog_{start,stop}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

> ---
>  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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux