kernel/trace/trace_dynevent.c:258:17: warning: unused variable 'entry'
From: kernel test robot
Date: Fri Jan 14 2022 - 07:06:50 EST
tree: https://github.com/0day-ci/linux/commits/UPDATE-20220114-091212/Yuntao-Wang/tracing-Use-trace_create_file-to-simplify-creation-of-tracefs-entry/20220114-002617
head: a6d78c971730a1847fa557309f42851ca421b71c
commit: a6d78c971730a1847fa557309f42851ca421b71c tracing: Use trace_create_file() to simplify creation of tracefs entries
date: 11 hours ago
config: mips-randconfig-r015-20220113 (https://download.01.org/0day-ci/archive/20220114/202201142023.gC8Ssh5U-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
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://github.com/0day-ci/linux/commit/a6d78c971730a1847fa557309f42851ca421b71c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20220114-091212/Yuntao-Wang/tracing-Use-trace_create_file-to-simplify-creation-of-tracefs-entry/20220114-002617
git checkout a6d78c971730a1847fa557309f42851ca421b71c
# 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@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> kernel/trace/trace_dynevent.c:258:17: warning: unused variable 'entry'
struct dentry
^
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 = 156, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $1 # atomic_add
addu $0, $2
sc $0, $1
beqz $0, 1b
.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/.trace_dynevent.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=gnu89 --target=mipsel-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 -EL -fno-stack-check -march=mips32 -Wa,--trap -DTOOLCHAIN_SUPPORTS_VIRT -Iarch/mips/include/asm/mach-db1x00 -Iarch/mips/include/asm/mach-au1x00 -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 -fomit-frame-pointer -fno-stack-clash-protection -falign-functions=64 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds -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 -I kernel/trace -I ./kernel/trace -ffunction-sections -fdata-sections -DKBUILD_MODFILE="kernel/trace/trace_dynevent" -DKBUILD_BASENAME="trace_dynevent" -DKBUILD_MODNAME="trace_dynevent" -D__KBUILD_MODNAME=kmod_trace_dynevent -c -o kernel/trace/trace_dynevent.o kernel/trace/trace_dynevent.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'kernel/trace/trace_dynevent.c'.
4. Running pass 'Mips Assembly Printer' on function '@trace_event_dyn_try_get_ref'
#0 0x000055d9791aa5cf Signals.cpp:0:0
#1 0x000055d9791a84ac llvm::sys::CleanupOnSignal(unsigned long) (/opt/cross/clang-82c8aca934/bin/clang-14+0x340f4ac)
#2 0x000055d9790ec337 llvm::CrashRecoveryContext::HandleExit(int) (/opt/cross/clang-82c8aca934/bin/clang-14+0x3353337)
#3 0x000055d9791a0b5e llvm::sys::Process::Exit(int, bool) (/opt/cross/clang-82c8aca934/bin/clang-14+0x3407b5e)
#4 0x000055d976e1e8bb (/opt/cross/clang-82c8aca934/bin/clang-14+0x10858bb)
#5 0x000055d9790f2dec llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/cross/clang-82c8aca934/bin/clang-14+0x3359dec)
#6 0x000055d979dcfd57 llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const (/opt/cross/clang-82c8aca934/bin/clang-14+0x4036d57)
#7 0x000055d979dcbcb4 llvm::AsmPrinter::emitFunctionBody() (/opt/cross/clang-82c8aca934/bin/clang-14+0x4032cb4)
#8 0x000055d97787af17 llvm::MipsAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/cross/clang-82c8aca934/bin/clang-14+0x1ae1f17)
#9 0x000055d97851b91d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#10 0x000055d9789542f7 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-82c8aca934/bin/clang-14+0x2bbb2f7)
#11 0x000055d978954471 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-82c8aca934/bin/clang-14+0x2bbb471)
#12 0x000055d97895574f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-82c8aca934/bin/clang-14+0x2bbc74f)
#13 0x000055d9794b999a 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-82c8aca934/bin/clang-14+0x372099a)
#14 0x000055d97a0e43e3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-82c8aca934/bin/clang-14+0x434b3e3)
#15 0x000055d97abe8789 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-82c8aca934/bin/clang-14+0x4e4f789)
#16 0x000055d97a0e323f clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-82c8aca934/bin/clang-14+0x434a23f)
#17 0x000055d979ae6c91 clang::FrontendAction::Execute() (/opt/cross/clang-82c8aca934/bin/clang-14+0x3d4dc91)
#18 0x000055d979a7e7ba clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-82c8aca934/bin/clang-14+0x3ce57ba)
#19 0x000055d979baad8b (/opt/cross/clang-82c8aca934/bin/clang-14+0x3e11d8b)
#20 0x000055d976e1f604 cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-82c8aca934/bin/clang-14+0x1086604)
#21 0x000055d976e1cb4b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
#22 0x000055d97991a8d5 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 0x000055d9790ec1f3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/cross/clang-82c8aca934/bin/clang-14+0x33531f3)
#24 0x000055d97991b1ce 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 0x000055d9798f19f7 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const (/opt/cross/clang-82c8aca934/bin/clang-14+0x3b589f7)
#26 0x000055d9798f23d7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) const (/opt/cross/clang-82c8aca934/bin/clang-14+0x3b593d7)
#27 0x000055d9798fbd19 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) (/opt/cross/clang-82c8aca934/bin/clang-14+0x3b62d19)
#28 0x000055d976d470df main (/opt/cross/clang-82c8aca934/bin/clang-14+0xfae0df)
#29 0x00007f98e437cd0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#30 0x000055d976e1c66a _start (/opt/cross/clang-82c8aca934/bin/clang-14+0x108366a)
clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project 82c8aca93488730ce8f66101e0f3538f14b551dd)
Target: mipsel-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-82c8aca934/bin
clang-14: note: diagnostic msg:
Makefile arch include kernel nr_bisected scripts source usr
vim +/entry +258 kernel/trace/trace_dynevent.c
5448d44c38557f Masami Hiramatsu 2018-11-05 254
5448d44c38557f Masami Hiramatsu 2018-11-05 255 /* Make a tracefs interface for controlling dynamic events */
5448d44c38557f Masami Hiramatsu 2018-11-05 256 static __init int init_dynamic_event(void)
5448d44c38557f Masami Hiramatsu 2018-11-05 257 {
5448d44c38557f Masami Hiramatsu 2018-11-05 @258 struct dentry *entry;
22c36b18263426 Wei Yang 2020-07-12 259 int ret;
5448d44c38557f Masami Hiramatsu 2018-11-05 260
22c36b18263426 Wei Yang 2020-07-12 261 ret = tracing_init_dentry();
22c36b18263426 Wei Yang 2020-07-12 262 if (ret)
5448d44c38557f Masami Hiramatsu 2018-11-05 263 return 0;
5448d44c38557f Masami Hiramatsu 2018-11-05 264
a6d78c971730a1 Yuntao Wang 2022-01-14 265 trace_create_file("dynamic_events", TRACE_MODE_WRITE, NULL,
5448d44c38557f Masami Hiramatsu 2018-11-05 266 NULL, &dynamic_events_ops);
5448d44c38557f Masami Hiramatsu 2018-11-05 267
5448d44c38557f Masami Hiramatsu 2018-11-05 268 return 0;
5448d44c38557f Masami Hiramatsu 2018-11-05 269 }
5448d44c38557f Masami Hiramatsu 2018-11-05 270 fs_initcall(init_dynamic_event);
86c5426baddae9 Tom Zanussi 2020-01-29 271
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx