[PATCH v2 2/4] iopoll: Add missing parenthesis to read_poll_timeout macro

Ronan Dalton ronan.dalton at alliedtelesis.co.nz
Wed Feb 25 04:05:32 CET 2026


Signed-off-by: Ronan Dalton <ronan.dalton at alliedtelesis.co.nz>
Cc: Ariel D'Alessandro <ariel.dalessandro at collabora.com>
Cc: Marek Vasut <marex at denx.de>
---
Changes for v2:
- This is a new patch in the patch set

 include/linux/iopoll.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index d6573fafab0..7dcbbac6443 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -29,12 +29,12 @@
  */
 #define read_poll_timeout(op, val, cond, sleep_us, timeout_us, args...)	\
 ({ \
-	unsigned long timeout = timer_get_us() + timeout_us; \
+	unsigned long timeout = timer_get_us() + (timeout_us); \
 	for (;;) { \
 		(val) = op(args); \
 		if (cond) \
 			break; \
-		if (timeout_us && time_after(timer_get_us(), timeout)) { \
+		if ((timeout_us) && time_after(timer_get_us(), timeout)) { \
 			(val) = op(args); \
 			break; \
 		} \
-- 
2.53.0



More information about the U-Boot mailing list