Messages in this thread Patch in this message | | | From | "Matthew Wilcox (Oracle)" <> | Subject | [PATCH 03/19] swait: Parameterize the return variable to __swait_event_interruptible_timeout() | Date | Wed, 2 Mar 2022 04:34:35 +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/swait.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/swait.h b/include/linux/swait.h index 0ca80e31776f..4147be3a0014 100644 --- a/include/linux/swait.h +++ b/include/linux/swait.h @@ -215,7 +215,7 @@ do { \ __ret; \ }) -#define __swait_event_interruptible_timeout(wq, condition, timeout) \ +#define __swait_event_interruptible_timeout(wq, condition, timeout, __ret) \ ___swait_event(wq, ___wait_cond_timeout(condition, __ret), \ TASK_INTERRUPTIBLE, timeout, \ __ret = schedule_timeout(__ret)) @@ -225,7 +225,7 @@ do { \ long __ret = timeout; \ if (!___wait_cond_timeout(condition, __ret)) \ __ret = __swait_event_interruptible_timeout(wq, \ - condition, timeout); \ + condition, timeout, __ret); \ __ret; \ }) -- 2.34.1
| |