aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2020-09-28 16:09:39 -0700
committerPeter Zijlstra <[email protected]>2020-10-02 21:18:25 +0200
commit69e0ad37c9f32d5aa1beb02aab4ec0cd055be013 (patch)
treeb9aff2e803e144f9c8932c0da87b3ef7ed497bbe /include/linux
parent547305a64632813286700cb6d768bfe773df7d19 (diff)
static_call: Fix return type of static_call_init
Functions that are passed to early_initcall should be of type initcall_t, which expects a return type of int. This is not currently an error but a patch in the Clang LTO series could change that in the future. Fixes: 9183c3f9ed71 ("static_call: Add inline static call infrastructure") Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Sami Tolvanen <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/static_call.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/static_call.h b/include/linux/static_call.h
index bfa2ba39be57..695da4c9b338 100644
--- a/include/linux/static_call.h
+++ b/include/linux/static_call.h
@@ -136,7 +136,7 @@ extern void arch_static_call_transform(void *site, void *tramp, void *func, bool
#ifdef CONFIG_HAVE_STATIC_CALL_INLINE
-extern void __init static_call_init(void);
+extern int __init static_call_init(void);
struct static_call_mod {
struct static_call_mod *next;
@@ -187,7 +187,7 @@ extern int static_call_text_reserved(void *start, void *end);
#elif defined(CONFIG_HAVE_STATIC_CALL)
-static inline void static_call_init(void) { }
+static inline int static_call_init(void) { return 0; }
struct static_call_key {
void *func;
@@ -234,7 +234,7 @@ static inline int static_call_text_reserved(void *start, void *end)
#else /* Generic implementation */
-static inline void static_call_init(void) { }
+static inline int static_call_init(void) { return 0; }
struct static_call_key {
void *func;