summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-09-26 09:31:28 -0600
committerTom Rini <trini@konsulko.com>2025-10-10 10:26:47 -0600
commit8ea8487da05cf93a9ae49c170f3b15d585a368f6 (patch)
tree717cace637e0c8deb995653f1973e19ef9560118 /include/linux
parent0a71fe2805eb8c8b1ede9525a28810266b77bcd7 (diff)
include: completion.h: Convert the rest of the dummy functions to macros
While we declare some of our dummy functions as "inline" we do not also declare them as "static" and so it is possible for the compiler to decide to make these as global functions instead. This can lead to link time failures in some cases, such as "allyesconfig". As these are just dummy functions, convert them to a macro instead. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/completion.h44
1 files changed, 8 insertions, 36 deletions
diff --git a/include/linux/completion.h b/include/linux/completion.h
index 9835826d285..d99ac450e8c 100644
--- a/include/linux/completion.h
+++ b/include/linux/completion.h
@@ -129,42 +129,14 @@ extern void complete_all(struct completion *);
#define wait_for_completion(x) do {} while (0)
#define wait_for_completion_io(x) do {} while (0)
-inline int wait_for_completion_interruptible(struct completion *x)
-{
- return 1;
-}
-inline int wait_for_completion_killable(struct completion *x)
-{
- return 1;
-}
-inline unsigned long wait_for_completion_timeout(struct completion *x,
- unsigned long timeout)
-{
- return 1;
-}
-inline unsigned long wait_for_completion_io_timeout(struct completion *x,
- unsigned long timeout)
-{
- return 1;
-}
-inline long wait_for_completion_interruptible_timeout(struct completion *x,
- unsigned long timeout)
-{
- return 1;
-}
-inline long wait_for_completion_killable_timeout(struct completion *x,
- unsigned long timeout)
-{
- return 1;
-}
-inline bool try_wait_for_completion(struct completion *x)
-{
- return 1;
-}
-inline bool completion_done(struct completion *x)
-{
- return 1;
-}
+#define wait_for_completion_interruptible(x) 1
+#define wait_for_completion_killable(x) 1
+#define wait_for_completion_timeout(x, timeout) 1
+#define wait_for_completion_io_timeout(x, timeout) 1
+#define wait_for_completion_interruptible_timeout(x, timeout) 1
+#define wait_for_completion_killable_timeout(x, timeout) 1
+#define try_wait_for_completion(x) 1
+#define completion_done(x) 1
#define complete(x) do {} while (0)
#define complete_all(x) do {} while (0)