mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
kcsan: Fix debugfs initcall return type
clang with CONFIG_LTO_CLANG points out that an initcall function should return an 'int' due to the changes made to the initcall macros in commit3578ad11f3("init: lto: fix PREL32 relocations"): 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:e36299efe7("kcsan, debugfs: Move debugfs file creation out of early init") Cc: stable <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Marco Elver <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
This commit is contained in:
1 parent
6efb943b86
commit
976aac5f88
1 file changed
+2
-1
@@ -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);
|
||||
Reference in new issue
Block a user