lkml.org 
[lkml]   [2022]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/19] wait: Parameterize the return variable to __wait_event_freezable_timeout()
Date
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 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

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

-#define __wait_event_freezable_timeout(wq_head, condition, timeout) \
+#define __wait_event_freezable_timeout(wq_head, condition, timeout, __ret) \
___wait_event(wq_head, ___wait_cond_timeout(condition, __ret), \
TASK_INTERRUPTIBLE, 0, timeout, \
__ret = freezable_schedule_timeout(__ret))
@@ -432,7 +432,8 @@ do { \
long __ret = timeout; \
might_sleep(); \
if (!___wait_cond_timeout(condition, __ret)) \
- __ret = __wait_event_freezable_timeout(wq_head, condition, timeout); \
+ __ret = __wait_event_freezable_timeout(wq_head, \
+ condition, timeout, __ret); \
__ret; \
})

--
2.34.1
\
 
 \ /
  Last update: 2022-03-02 05:37    [W:0.105 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site