drivers/misc/cardreader/rtsx_pcr.c:62:20: warning: unused function 'rtsx_pci_disable_aspm'

From: kernel test robot
Date: Sat Dec 26 2020 - 13:29:06 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 40f78232f97344afbbeb5b0008615f17c4b93466
commit: 5b4258f6721f41b092c63f6ee71be76e9616718b misc: rtsx: rts5249 support runtime PM
date: 2 weeks ago
config: mips-randconfig-r034-20201225 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
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/torvalds/linux.git/commit/?id=5b4258f6721f41b092c63f6ee71be76e9616718b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5b4258f6721f41b092c63f6ee71be76e9616718b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips

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

All warnings (new ones prefixed by >>):

>> drivers/misc/cardreader/rtsx_pcr.c:62:20: warning: unused function 'rtsx_pci_disable_aspm'
static inline void rtsx_pci_disable_aspm(struct rtsx_pcr
^
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 = 153, $); 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
'
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (git://gitmirror/llvm_project cee1e7d14f4628d6174b33640d502bff3b54ae45)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-cee1e7d14f/bin
clang-12: note: diagnostic msg:
Makefile arch drivers fs include kernel modules.order net scripts security sound source usr


vim +/rtsx_pci_disable_aspm +62 drivers/misc/cardreader/rtsx_pcr.c

ada8a8a13b13a27 drivers/mfd/rtsx_pcr.c Wei WANG 2012-10-29 61
19f3bd548f2750a drivers/mfd/rtsx_pcr.c Micky Ching 2015-02-25 @62 static inline void rtsx_pci_disable_aspm(struct rtsx_pcr *pcr)
19f3bd548f2750a drivers/mfd/rtsx_pcr.c Micky Ching 2015-02-25 63 {
3d1e7aa80d1c0e7 drivers/misc/cardreader/rtsx_pcr.c Bjorn Helgaas 2020-05-21 64 pcie_capability_clear_and_set_word(pcr->pci, PCI_EXP_LNKCTL,
3d1e7aa80d1c0e7 drivers/misc/cardreader/rtsx_pcr.c Bjorn Helgaas 2020-05-21 65 PCI_EXP_LNKCTL_ASPMC, 0);
19f3bd548f2750a drivers/mfd/rtsx_pcr.c Micky Ching 2015-02-25 66 }
19f3bd548f2750a drivers/mfd/rtsx_pcr.c Micky Ching 2015-02-25 67

:::::: The code at line 62 was first introduced by commit
:::::: 19f3bd548f2750a8a7e4e6d2f25fdc5f8e2c3ee9 mfd: rtsx: Remove LCTLR defination

:::::: TO: Micky Ching <micky_ching@xxxxxxxxxxxxxx>
:::::: CC: Lee Jones <lee.jones@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip