linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kcsan: fix debugfs initcall return type
@ 2021-05-14 14:00 Arnd Bergmann
  2021-05-14 14:10 ` Greg Kroah-Hartman
  2021-05-14 18:29 ` Nathan Chancellor
  0 siblings, 2 replies; 17+ messages in thread
From: Arnd Bergmann @ 2021-05-14 14:00 UTC (permalink / raw)
  To: Marco Elver, Nathan Chancellor, Nick Desaulniers,
	Paul E. McKenney, Greg Kroah-Hartman
  Cc: Arnd Bergmann, Dmitry Vyukov, kasan-dev, linux-kernel, clang-built-linux

From: Arnd Bergmann <arnd@arndb.de>

clang points out that an initcall funciton should return an 'int':

kernel/kcsan/debugfs.c:274:15: error: returning 'void' from a function with incompatible result type 'int'
late_initcall(kcsan_debugfs_init);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
include/linux/init.h:292:46: note: expanded from macro 'late_initcall'
 #define late_initcall(fn)               __define_initcall(fn, 7)

Fixes: e36299efe7d7 ("kcsan, debugfs: Move debugfs file creation out of early init")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/kcsan/debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c
index c1dd02f3be8b..e65de172ccf7 100644
--- a/kernel/kcsan/debugfs.c
+++ b/kernel/kcsan/debugfs.c
@@ -266,9 +266,10 @@ static const struct file_operations debugfs_ops =
 	.release = single_release
 };
 
-static void __init kcsan_debugfs_init(void)
+static int __init kcsan_debugfs_init(void)
 {
 	debugfs_create_file("kcsan", 0644, NULL, NULL, &debugfs_ops);
+	return 0;
 }
 
 late_initcall(kcsan_debugfs_init);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-05-19  8:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 14:00 [PATCH] kcsan: fix debugfs initcall return type Arnd Bergmann
2021-05-14 14:10 ` Greg Kroah-Hartman
2021-05-14 14:45   ` Marco Elver
2021-05-14 15:28     ` Arnd Bergmann
2021-05-14 18:40     ` Nathan Chancellor
2021-05-14 18:29 ` Nathan Chancellor
2021-05-14 19:36   ` Paul E. McKenney
2021-05-14 20:11     ` Nathan Chancellor
2021-05-14 20:18       ` Paul E. McKenney
2021-05-14 21:16         ` Arnd Bergmann
2021-05-14 23:01           ` Marco Elver
2021-05-15  0:55             ` Paul E. McKenney
2021-05-18 23:20               ` Paul E. McKenney
2021-05-19  8:09                 ` Marco Elver
2021-05-15 14:19             ` Miguel Ojeda
2021-05-17 18:24               ` Paul E. McKenney
2021-05-16  5:17             ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).