[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202204160113.5Pvywod8-lkp@intel.com>
Date: Sat, 16 Apr 2022 01:35:13 +0800
From: kernel test robot <lkp@...el.com>
To: Wei Xiao <xiaowei66@...wei.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Luis Chamberlain <mcgrof@...nel.org>
Subject: [mcgrof:sysctl-testing 18/18] kernel/trace/ftrace.c:3068:13:
warning: unused function 'ftrace_startup_sysctl'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-testing
head: 7cde53da38a3ea00d75ef6a6ab06fa85b80bcf87
commit: 7cde53da38a3ea00d75ef6a6ab06fa85b80bcf87 [18/18] ftrace: move sysctl_ftrace_enabled to ftrace.c
config: mips-randconfig-c004-20220414 (https://download.01.org/0day-ci/archive/20220416/202204160113.5Pvywod8-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6b7e6ea489f6dd45a9b0da9ac20871560917b9b0)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?id=7cde53da38a3ea00d75ef6a6ab06fa85b80bcf87
git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
git fetch --no-tags mcgrof sysctl-testing
git checkout 7cde53da38a3ea00d75ef6a6ab06fa85b80bcf87
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
kernel/trace/ftrace.c:297:5: warning: no previous prototype for function '__register_ftrace_function'
int __register_ftrace_function(struct ftrace_ops
^
kernel/trace/ftrace.c:297:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __register_ftrace_function(struct ftrace_ops
^
static
kernel/trace/ftrace.c:340:5: warning: no previous prototype for function '__unregister_ftrace_function'
int __unregister_ftrace_function(struct ftrace_ops
^
kernel/trace/ftrace.c:340:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __unregister_ftrace_function(struct ftrace_ops
^
static
kernel/trace/ftrace.c:3922:15: warning: no previous prototype for function 'arch_ftrace_match_adjust'
char Makefile arch certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt __weak arch_ftrace_match_adjust(char const char
^
kernel/trace/ftrace.c:3922:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
char Makefile arch certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt __weak arch_ftrace_match_adjust(char const char
^
static
>> kernel/trace/ftrace.c:3068:13: warning: unused function 'ftrace_startup_sysctl'
static void ftrace_startup_sysctl(void)
^
>> kernel/trace/ftrace.c:3086:13: warning: unused function 'ftrace_shutdown_sysctl'
static void ftrace_shutdown_sysctl(void)
^
>> kernel/trace/ftrace.c:7912:13: warning: unused function 'is_permanent_ops_registered'
static bool is_permanent_ops_registered(void)
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 155, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $1, $2 # atomic_add_return
addu $0, $1, $3
sc $0, $2
beqz $0, 1b
addu $0, $1, $3
.set pop
'
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -Wp,-MMD,kernel/trace/.ftrace.o.d -nostdinc -Iarch/mips/include -I./arch/mips/include/generated -Iinclude -I./include -Iarch/mips/include/uapi -I./arch/mips/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -DVMLINUX_LOAD_ADDRESS=0xffffffff84000000 -DLINKER_LOAD_ADDRESS=0x84000000 -DDATAOFFSET=0 -Qunused-arguments -fmacro-prefix-map== -DKBUILD_EXTRA_WARN1 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 --target=mips-linux -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-check-zero-division -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float -ffreestanding -EB -fno-stack-check -march=mips32r2 -Wa,--trap -DTOOLCHAIN_SUPPORTS_VIRT -Iarch/mips/include/asm/mach-ath79 -Iarch/mips/include/asm/mach-generic -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=1024 -fstack-protector -Wimplicit-fallthrough -Wno-gnu -mno-global-merge -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-stack-clash-protection -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-shift-negative-value -gsplit-dwarf -gdwarf-5 -I kernel/trace -I ./kernel/trace -ffunction-sections -fdata-sections -DKBUILD_MODFILE="kernel/trace/libftrace" -DKBUILD_BASENAME="ftrace" -DKBUILD_MODNAME="libftrace" -D__KBUILD_MODNAME=kmod_libftrace -c -o kernel/trace/ftrace.o kernel/trace/ftrace.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'kernel/trace/ftrace.c'.
4. Running pass 'Mips Assembly Printer' on function '@...file_graph_entry'
#0 0x00005562159e0a7f Signals.cpp:0:0
#1 0x00005562159de8a4 llvm::sys::CleanupOnSignal(unsigned long) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x34f18a4)
#2 0x000055621591e087 llvm::CrashRecoveryContext::HandleExit(int) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3431087)
#3 0x00005562159d6ede llvm::sys::Process::Exit(int, bool) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x34e9ede)
#4 0x00005562135aa92b (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x10bd92b)
#5 0x0000556215924bac llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3437bac)
#6 0x0000556216654260 llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x4167260)
#7 0x0000556216650162 llvm::AsmPrinter::emitFunctionBody() (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x4163162)
#8 0x0000556214030d07 llvm::MipsAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x1b43d07)
#9 0x0000556214d0c47d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#10 0x0000556215156457 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x2c69457)
#11 0x00005562151565d1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x2c695d1)
#12 0x000055621515714f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x2c6a14f)
#13 0x0000556215d0b4c6 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x381e4c6)
#14 0x0000556216974ca3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x4487ca3)
#15 0x00005562174a8a01 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x4fbba01)
#16 0x0000556216974395 clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x4487395)
#17 0x000055621636a831 clang::FrontendAction::Execute() (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3e7d831)
#18 0x00005562162ffb1a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3e12b1a)
#19 0x000055621643163b (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3f4463b)
#20 0x00005562135abedc cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x10beedc)
#21 0x00005562135a8bab ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
#22 0x00005562161923f5 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const::'lambda'()>(long) Job.cpp:0:0
#23 0x000055621591df43 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3430f43)
#24 0x0000556216192cee clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const (.part.216) Job.cpp:0:0
#25 0x0000556216166de7 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3c79de7)
#26 0x00005562161677c7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) const (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3c7a7c7)
#27 0x0000556216170e19 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x3c83e19)
#28 0x00005562134f5d2f main (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x1008d2f)
#29 0x00007fc6ba6eb7fd __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x237fd)
#30 0x00005562135a86ca _start (/opt/cross/clang-6b7e6ea489/bin/clang-15+0x10bb6ca)
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (git://gitmirror/llvm_project 6b7e6ea489f6dd45a9b0da9ac20871560917b9b0)
Target: mips-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-6b7e6ea489/bin
clang-15: note: diagnostic msg:
Makefile arch certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt
vim +/ftrace_startup_sysctl +3068 kernel/trace/ftrace.c
3d0833953e1b98 Steven Rostedt 2008-05-12 3067
e309b41dd65aa9 Ingo Molnar 2008-05-12 @3068 static void ftrace_startup_sysctl(void)
b0fc494fae96a7 Steven Rostedt 2008-05-12 3069 {
1619dc3f8f555e Pratyush Anand 2015-03-06 3070 int command;
1619dc3f8f555e Pratyush Anand 2015-03-06 3071
4eebcc81a33fbc Steven Rostedt 2008-05-12 3072 if (unlikely(ftrace_disabled))
4eebcc81a33fbc Steven Rostedt 2008-05-12 3073 return;
4eebcc81a33fbc Steven Rostedt 2008-05-12 3074
d61f82d06672f5 Steven Rostedt 2008-05-12 3075 /* Force update next time */
d61f82d06672f5 Steven Rostedt 2008-05-12 3076 saved_ftrace_func = NULL;
60a7ecf42661f2 Steven Rostedt 2008-11-05 3077 /* ftrace_start_up is true if we want ftrace running */
1619dc3f8f555e Pratyush Anand 2015-03-06 3078 if (ftrace_start_up) {
1619dc3f8f555e Pratyush Anand 2015-03-06 3079 command = FTRACE_UPDATE_CALLS;
1619dc3f8f555e Pratyush Anand 2015-03-06 3080 if (ftrace_graph_active)
1619dc3f8f555e Pratyush Anand 2015-03-06 3081 command |= FTRACE_START_FUNC_RET;
524a38682573b2 Steven Rostedt (Red Hat 2015-03-06 3082) ftrace_startup_enable(command);
1619dc3f8f555e Pratyush Anand 2015-03-06 3083 }
b0fc494fae96a7 Steven Rostedt 2008-05-12 3084 }
b0fc494fae96a7 Steven Rostedt 2008-05-12 3085
e309b41dd65aa9 Ingo Molnar 2008-05-12 @3086 static void ftrace_shutdown_sysctl(void)
b0fc494fae96a7 Steven Rostedt 2008-05-12 3087 {
1619dc3f8f555e Pratyush Anand 2015-03-06 3088 int command;
1619dc3f8f555e Pratyush Anand 2015-03-06 3089
4eebcc81a33fbc Steven Rostedt 2008-05-12 3090 if (unlikely(ftrace_disabled))
4eebcc81a33fbc Steven Rostedt 2008-05-12 3091 return;
4eebcc81a33fbc Steven Rostedt 2008-05-12 3092
60a7ecf42661f2 Steven Rostedt 2008-11-05 3093 /* ftrace_start_up is true if ftrace is running */
1619dc3f8f555e Pratyush Anand 2015-03-06 3094 if (ftrace_start_up) {
1619dc3f8f555e Pratyush Anand 2015-03-06 3095 command = FTRACE_DISABLE_CALLS;
1619dc3f8f555e Pratyush Anand 2015-03-06 3096 if (ftrace_graph_active)
1619dc3f8f555e Pratyush Anand 2015-03-06 3097 command |= FTRACE_STOP_FUNC_RET;
1619dc3f8f555e Pratyush Anand 2015-03-06 3098 ftrace_run_update_code(command);
1619dc3f8f555e Pratyush Anand 2015-03-06 3099 }
b0fc494fae96a7 Steven Rostedt 2008-05-12 3100 }
b0fc494fae96a7 Steven Rostedt 2008-05-12 3101
:::::: The code at line 3068 was first introduced by commit
:::::: e309b41dd65aa953f86765eeeecc941d8e1e8b8f ftrace: remove notrace
:::::: TO: Ingo Molnar <mingo@...e.hu>
:::::: CC: Thomas Gleixner <tglx@...utronix.de>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists