lkml.org 
[lkml]   [2021]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/dma/qcom/gpi.c:577:20: warning: unused function 'gpi_write_reg_field'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d999ade1cc86cd2951d41c11ea769cb4452c8811
commit: 5d0c3533a19f48e5e7e73806a3e4b29cd4364130 dmaengine: qcom: Add GPI dma driver
date: 11 months ago
config: arm64-randconfig-r004-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5d0c3533a19f48e5e7e73806a3e4b29cd4364130
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5d0c3533a19f48e5e7e73806a3e4b29cd4364130
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/dma/qcom/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/dma/qcom/gpi.c:577:20: warning: unused function 'gpi_write_reg_field'
static inline void gpi_write_reg_field(struct gpii void __iomem
^
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/cross/clang-746dd6a700/bin/clang-14 -cc1 -triple aarch64-unknown-linux -S -disable-free -disable-llvm-verifier -discard-value-names -main-file-name gpi.c -mrelocation-model static -fno-delete-null-pointer-checks -fwarn-stack-size=2048 -mframe-pointer=non-leaf -relaxed-aliasing -mdisable-tail-calls -fmath-errno -fno-rounding-math -no-integrated-as -mconstructor-aliases -target-cpu generic -target-feature -fp-armv8 -target-feature -crypto -target-feature -neon -target-feature -sha2 -target-feature -aes -target-abi aapcs -mllvm -aarch64-enable-global-merge=false -msign-return-address=none -msign-return-address-key=a_key -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fno-dwarf-directory-asm -fcoverage-compilation-dir=/kbuild/obj/consumer/arm64-randconfig-r004-20211017 -nostdsysteminc -nobuiltininc -resource-dir /opt/cross/clang-746dd6a700/lib/clang/14.0.0 -dependency-file drivers/dma/qcom/.gpi.o.d -MT drivers/dma/qcom/gpi.o -isystem /opt/cross/clang-746dd6a700/lib/clang/14.0.0/include -include include/linux/kconfig.h -include include/linux/compiler_types.h -I arch/arm64/include -I ./arch/arm64/include/generated -I include -I ./include -I arch/arm64/include/uapi -I ./arch/arm64/include/generated/uapi -I include/uapi -I ./include/generated/uapi -D __KERNEL__ -D KASAN_SHADOW_SCALE_SHIFT=3 -D KBUILD_EXTRA_WARN1 -D CONFIG_CC_HAS_K_CONSTRAINT=1 -D ARM64_ASM_ARCH="armv8.4-a" -D KASAN_SHADOW_SCALE_SHIFT=3 -I drivers/dma/qcom -I ./drivers/dma/qcom -D KBUILD_MODFILE="drivers/dma/qcom/gpi" -D KBUILD_BASENAME="gpi" -D KBUILD_MODNAME="gpi" -fmacro-prefix-map== -O2 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -Werror=unknown-warning-option -Wno-psabi -Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-format-invalid-specifier -Wno-gnu -Wno-unused-const-variable -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds -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 -std=gnu89 -fdebug-compilation-dir=/kbuild/obj/consumer/arm64-randconfig-r004-20211017 -ferror-limit 19 -fwrapv -ftrivial-auto-var-init=zero -fno-signed-char -fwchar-type=short -fno-signed-wchar -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -o /tmp/gpi-0212f3.s -x c drivers/dma/qcom/gpi.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'drivers/dma/qcom/gpi.c'.
4. Running pass 'AArch64 MI Peephole Optimization pass' on function '@gpi_alloc_chan'
#0 0x00005564e6b82eff Signals.cpp:0:0
#1 0x00005564e6b8078e SignalHandler(int) Signals.cpp:0:0
#2 0x00007f5323be9140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#3 0x00005564e4a30173 (anonymous namespace)::AArch64MIPeepholeOpt::checkMovImmInstr(llvm::MachineInstr&, (.isra.69) AArch64MIPeepholeOpt.cpp:0:0
#4 0x00005564e4a330fc bool (anonymous namespace)::AArch64MIPeepholeOpt::visitADDSUB<unsigned long>(llvm::MachineInstr&, 8u>&, bool) AArch64MIPeepholeOpt.cpp:0:0
#5 0x00005564e4a367bc (anonymous namespace)::AArch64MIPeepholeOpt::runOnMachineFunction(llvm::MachineFunction&) (.part.81) AArch64MIPeepholeOpt.cpp:0:0
#6 0x00005564e5f32f7d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#7 0x00005564e6355c27 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x2c42c27)
#8 0x00005564e6355da1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x2c42da1)
#9 0x00005564e635707f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x2c4407f)
#10 0x00005564e6e6b07f 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-746dd6a700/bin/clang-14+0x375807f)
#11 0x00005564e7ae30a3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x43d00a3)
#12 0x00005564e85c4019 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-746dd6a700/bin/clang-14+0x4eb1019)
#13 0x00005564e7ae1f0f clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-746dd6a700/bin/clang-14+0x43cef0f)
#14 0x00005564e747bc21 clang::FrontendAction::Execute() (/opt/cross/clang-746dd6a700/bin/clang-14+0x3d68c21)
#15 0x00005564e741464a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-746dd6a700/bin/clang-14+0x3d0164a)
#16 0x00005564e75447ab (/opt/cross/clang-746dd6a700/bin/clang-14+0x3e317ab)
#17 0x00005564e48dddb4 cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-746dd6a700/bin/clang-14+0x11cadb4)
#18 0x00005564e48db30b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
#19 0x00005564e4807461 main (/opt/cross/clang-746dd6a700/bin/clang-14+0x10f4461)
#20 0x00007f53236e2d0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#21 0x00005564e48dae2a _start (/opt/cross/clang-746dd6a700/bin/clang-14+0x11c7e2a)
clang-14: error: unable to execute command: Segmentation fault
clang-14: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project 746dd6a700931988dd9021d3d04718f1929885a5)
Target: aarch64-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-746dd6a700/bin
clang-14: note: diagnostic msg:
Makefile arch drivers include kernel nr_bisected scripts source usr


vim +/gpi_write_reg_field +577 drivers/dma/qcom/gpi.c

575
576 /* gpi_write_reg_field - write to specific bit field */
> 577 static inline void gpi_write_reg_field(struct gpii *gpii, void __iomem *addr,
578 u32 mask, u32 shift, u32 val)
579 {
580 u32 tmp = gpi_read_reg(gpii, addr);
581
582 tmp &= ~mask;
583 val = tmp | ((val << shift) & mask);
584 gpi_write_reg(gpii, addr, val);
585 }
586

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-10-17 02:30    [W:0.032 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site