Messages in this thread Patch in this message | | | From | "Matthew Wilcox (Oracle)" <> | Subject | [PATCH 05/19] wait: Parameterize the return variable to __wait_event_timeout() | Date | Wed, 2 Mar 2022 04:34:37 +0000 |
| |
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@infradead.org> --- 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 890cce3c0f2e..b34d36001fd2 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -385,7 +385,7 @@ do { \ __ret; \ }) -#define __wait_event_timeout(wq_head, condition, timeout) \ +#define __wait_event_timeout(wq_head, condition, timeout, __ret) \ ___wait_event(wq_head, ___wait_cond_timeout(condition, __ret), \ TASK_UNINTERRUPTIBLE, 0, timeout, \ __ret = schedule_timeout(__ret)) @@ -414,7 +414,7 @@ do { \ long __ret = timeout; \ might_sleep(); \ if (!___wait_cond_timeout(condition, __ret)) \ - __ret = __wait_event_timeout(wq_head, condition, timeout); \ + __ret = __wait_event_timeout(wq_head, condition, timeout, __ret); \ __ret; \ }) -- 2.34.1
| |