drivers/platform/x86/amd-pmc.c:229:30: sparse: sparse: symbol 'amd_pmc_stb_debugfs_fops' was not declared. Should it be static?

From: kernel test robot
Date: Wed Jan 12 2022 - 16:38:21 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e3084ed48fd6b661fe434da0cb36d7d6706cf27f
commit: 426c0ff27b833939ed434b4a468bdc010864922a platform/x86: amd-pmc: Add support for AMD Smart Trace Buffer
date: 3 weeks ago
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220113/202201130558.YpowhSOs-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=426c0ff27b833939ed434b4a468bdc010864922a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 426c0ff27b833939ed434b4a468bdc010864922a
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/leds/ drivers/platform/x86/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/amd-pmc.c:229:30: sparse: sparse: symbol 'amd_pmc_stb_debugfs_fops' was not declared. Should it be static?

vim +/amd_pmc_stb_debugfs_fops +229 drivers/platform/x86/amd-pmc.c

228
> 229 const struct file_operations amd_pmc_stb_debugfs_fops = {
230 .owner = THIS_MODULE,
231 .open = amd_pmc_stb_debugfs_open,
232 .read = amd_pmc_stb_debugfs_read,
233 .release = amd_pmc_stb_debugfs_release,
234 };
235

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