]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
include: completion.h: Convert the rest of the dummy functions to macros
authorTom Rini <trini@konsulko.com>
Fri, 26 Sep 2025 15:31:28 +0000 (09:31 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 10 Oct 2025 16:26:47 +0000 (10:26 -0600)
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>
include/linux/completion.h

index 9835826d285e46f45e9e33f93b601512738521a1..d99ac450e8cd84e8029ccc929fd83048cc79f620 100644 (file)
@@ -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)