[PATCH 07/19] wait: Parameterize the return variable to __wait_event_interruptible_timeout()

From: Matthew Wilcox (Oracle)
Date: Tue Mar 01 2022 - 23:36:20 EST


Macros should not refer to variables which aren't in their arguments.
Pass the name from its caller.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
include/linux/wait.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/wait.h b/include/linux/wait.h
index 5f2c43373061..a4a17f3b6871 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -503,7 +503,7 @@ do { \
__ret; \
})

-#define __wait_event_interruptible_timeout(wq_head, condition, timeout) \
+#define __wait_event_interruptible_timeout(wq_head, condition, timeout, __ret) \
___wait_event(wq_head, ___wait_cond_timeout(condition, __ret), \
TASK_INTERRUPTIBLE, 0, timeout, \
__ret = schedule_timeout(__ret))
@@ -534,7 +534,7 @@ do { \
might_sleep(); \
if (!___wait_cond_timeout(condition, __ret)) \
__ret = __wait_event_interruptible_timeout(wq_head, \
- condition, timeout); \
+ condition, timeout, __ret); \
__ret; \
})

--
2.34.1