[PATCH] powerpc/powermac: fix a loop in core99_usb_enable

Denis Kirjanov kirjanov at gmail.com
Sun Feb 2 23:46:40 AEDT 2025


Looks like we have a typo in the do-while loop
while checking the loop condition. Fix it with the boolean OR

Signed-off-by: Denis Kirjanov <kirjanov at gmail.com>
---
 arch/powerpc/platforms/powermac/feature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index d3bcfe590384..9d929fbfc46b 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -1174,7 +1174,7 @@ core99_usb_enable(struct device_node *node, long param, long value)
 				mdelay(1);
 				status0 = UN_IN(UNI_N_CLOCK_STOP_STATUS0);
 				status1 = UN_IN(UNI_N_CLOCK_STOP_STATUS1);
-			} while ((status0 & test0) | (status1 & test1));
+			} while ((status0 & test0) || (status1 & test1));
 			LOCK(flags);
 		}
 	} else {
-- 
2.47.2



More information about the Linuxppc-dev mailing list