The read_poll_timeout macro definition is missing parenthesis around the usages of timeout_us. Also, the local timeout variable should be named __timeout to distinguish it from any variable named timeout in the surrounding scope.
Wrap the timeout_us parameter in brackets and rename timeout to __timeout to follow macro definition best-practices. This change brings the macro definition more in line with what Linux does. Signed-off-by: Ronan Dalton <[email protected]> Cc: Ariel D'Alessandro <[email protected]> Cc: Marek Vasut <[email protected]> --- Changes for v2: - This is a new patch in the patch set Changes for v3: - Use __timeout instead of timeout variable declaration to avoid clashes - Rename patch headline to reflect extra change mentioned above Changes for v4: - Update commit message to have more detail 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..e851eb2cc41 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

