diff mbox series

[5/5] power: reset: brcmstb: Do not go into infinite loop if reset fails

Message ID 20240610142836.168603-5-afd@ti.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series [1/5] power: reset: brcmstb: Use normal driver register function | expand

Commit Message

Andrew Davis June 10, 2024, 2:28 p.m. UTC
There may be other backup reset methods available, do not halt
here so that other reset methods can be tried.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 drivers/power/reset/brcmstb-reboot.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Dhruva Gole June 11, 2024, 6:21 a.m. UTC | #1
On Jun 10, 2024 at 09:28:36 -0500, Andrew Davis wrote:
> There may be other backup reset methods available, do not halt
> here so that other reset methods can be tried.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  drivers/power/reset/brcmstb-reboot.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/power/reset/brcmstb-reboot.c b/drivers/power/reset/brcmstb-reboot.c
> index 59ed1513cfb30..441b44e0a9f29 100644
> --- a/drivers/power/reset/brcmstb-reboot.c
> +++ b/drivers/power/reset/brcmstb-reboot.c
> @@ -58,9 +58,6 @@ static int brcmstb_restart_handler(struct sys_off_data *data)
>  		return NOTIFY_DONE;
>  	}
>  
> -	while (1)
> -		;
> -

I agree, while (1) may not be the best thing to do here.
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Florian Fainelli June 16, 2024, 12:33 p.m. UTC | #2
On 6/10/2024 3:28 PM, Andrew Davis wrote:
> There may be other backup reset methods available, do not halt
> here so that other reset methods can be tried.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>

Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff mbox series

Patch

diff --git a/drivers/power/reset/brcmstb-reboot.c b/drivers/power/reset/brcmstb-reboot.c
index 59ed1513cfb30..441b44e0a9f29 100644
--- a/drivers/power/reset/brcmstb-reboot.c
+++ b/drivers/power/reset/brcmstb-reboot.c
@@ -58,9 +58,6 @@  static int brcmstb_restart_handler(struct sys_off_data *data)
 		return NOTIFY_DONE;
 	}
 
-	while (1)
-		;
-
 	return NOTIFY_DONE;
 }