]> git.baikalelectronics.ru Git - kernel.git/commit
kcsan: Fix debugfs initcall return type
authorArnd Bergmann <arnd@arndb.de>
Fri, 14 May 2021 14:00:08 +0000 (16:00 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 18 May 2021 17:58:02 +0000 (10:58 -0700)
commitf380cdd3ab6769972af9e9af4301065b76c53efe
tree455c24dd68f6c40fba0f3df0446156dd3d0f1e86
parent9fb51bb203ba1c67f480638e9d0605db59810687
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 commit
4518a319ecf3 ("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: 5381af5640fa ("kcsan, debugfs: Move debugfs file creation out of early init")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Marco Elver <elver@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/kcsan/debugfs.c