diff mbox series

[v2,2/3] watchdog/hpwdt: Remove redundant test.

Message ID 20231213215340.495734-3-jerry.hoemann@hpe.com
State New
Headers show
Series watchdog/hpwdt: Cleanup Claiming NMI | expand

Commit Message

Jerry Hoemann Dec. 13, 2023, 9:53 p.m. UTC
ProLiants of vintage to have an iLO 5, no longer send watchdog NMI
as an IO CHECK.  They are presented to hpwdt_pretimeout as NMI_UNKNOWN.
The preceding if statement rejects if !mynmi irrespective of value
of pretimeout making this if statement redundant.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/watchdog/hpwdt.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Guenter Roeck Dec. 13, 2023, 10:14 p.m. UTC | #1
On Wed, Dec 13, 2023 at 02:53:39PM -0700, Jerry Hoemann wrote:
> ProLiants of vintage to have an iLO 5, no longer send watchdog NMI
> as an IO CHECK.  They are presented to hpwdt_pretimeout as NMI_UNKNOWN.
> The preceding if statement rejects if !mynmi irrespective of value
> of pretimeout making this if statement redundant.
> 
> Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>

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

> ---
>  drivers/watchdog/hpwdt.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index 79ed1626d8ea..d5c0aa3ef069 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -181,9 +181,6 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
>  	if (ulReason == NMI_UNKNOWN && !mynmi)
>  		return NMI_DONE;
>  
> -	if (ilo5 && !pretimeout && !mynmi)
> -		return NMI_DONE;
> -
>  	if (kdumptimeout < 0)
>  		hpwdt_stop();
>  	else if (kdumptimeout == 0)
> -- 
> 2.41.0
>
diff mbox series

Patch

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 79ed1626d8ea..d5c0aa3ef069 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -181,9 +181,6 @@  static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
 	if (ulReason == NMI_UNKNOWN && !mynmi)
 		return NMI_DONE;
 
-	if (ilo5 && !pretimeout && !mynmi)
-		return NMI_DONE;
-
 	if (kdumptimeout < 0)
 		hpwdt_stop();
 	else if (kdumptimeout == 0)