watchdog: indydog: Simplify indydog_{start,stop}
PATCH 1/1 watchdog: indydog: Simplify indydog_{start,stop}
This patch simplify functions indydog_start() and indydog_stop() a bit and removes excess intermediate variable.
Signed-off-by Alexander Shiyan <[email protected]>
--- drivers/watchdog/indydog.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
drivers/watchdog/indydog.c +2 -11
@@ -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" );
Signature · 1 line
1.8.3.2
Quoted 4 lines · Alexander Shiyan
This patch simplify functions
indydog_start()andindydog_stop()a bit and removes excess intermediate variable.Signed-off-by Alexander Shiyan <[email protected]>
Reviewed-by Guenter Roeck <[email protected]>
Quoted 43 lines
--- drivers/watchdog/indydog.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)drivers/watchdog/indydog.c +2
-11@@ -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" );Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Alexander,
Quoted 42 lines
This patch simplify functions
indydog_start()andindydog_stop()a bit and removes excess intermediate variable.Signed-off-by Alexander Shiyan <[email protected]>--- drivers/watchdog/indydog.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)drivers/watchdog/indydog.c +2
-11@@ -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" );Signature · 1 line
1.8.3.2
This patch has been added to linux-watchdog-next.
Kind regards,
Wim.