sound/soc/samsung/spdif.c:95:2: warning: unused function 'component_to_info'

From: kernel test robot
Date: Sun Dec 12 2021 - 05:35:21 EST


Hi Arnd,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a763d5a5abd65797aec3dd1bf01fe2ccbec32967
commit: 35f752be4f412a1a58f4c15fa9282c53b956e067 mips: ralink: convert to CONFIG_COMMON_CLK
date: 6 months ago
config: mips-randconfig-r026-20211211 (https://download.01.org/0day-ci/archive/20211212/202112121823.rMdVwjAL-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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=35f752be4f412a1a58f4c15fa9282c53b956e067
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 35f752be4f412a1a58f4c15fa9282c53b956e067
# 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 fs// mm// sound/soc/

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

All warnings (new ones prefixed by >>):

>> sound/soc/samsung/spdif.c:95:2: warning: unused function 'component_to_info'
snd_soc_component
^
fatal error: error in backend: Nested variants found in inline asm string: '.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/barrier.h", .line = 16, $); 0x00 ) != -1)) : $))) ) && ( (1 << 0) ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif'
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 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
Target: mipsel-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-097a1cb1d5/bin
clang-14: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm nr_bisected scripts security sound source usr virt


vim +/component_to_info +95 sound/soc/samsung/spdif.c

fc127ccccc5de1 sound/soc/s3c24xx/spdif.c Seungwhan Youn 2010-10-12 93
79a5cf90f8719c sound/soc/samsung/spdif.c Kuninori Morimoto 2020-01-20 94 static inline struct samsung_spdif_info
79a5cf90f8719c sound/soc/samsung/spdif.c Kuninori Morimoto 2020-01-20 @95 *component_to_info(struct snd_soc_component *component)
79a5cf90f8719c sound/soc/samsung/spdif.c Kuninori Morimoto 2020-01-20 96 {
79a5cf90f8719c sound/soc/samsung/spdif.c Kuninori Morimoto 2020-01-20 97 return snd_soc_component_get_drvdata(component);
79a5cf90f8719c sound/soc/samsung/spdif.c Kuninori Morimoto 2020-01-20 98 }
79a5cf90f8719c sound/soc/samsung/spdif.c Kuninori Morimoto 2020-01-20 99

:::::: The code at line 95 was first introduced by commit
:::::: 79a5cf90f8719c3f69a0dc53efebb38da654512f ASoC: samsung: spdif: move .suspend/.resume to component

:::::: TO: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>

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