Skip to contentSkip to conversation

samples/tsm-mr/tsm_mr_sample.c:17:3: sparse: sparse: symbol 'sample_report' was not declared. Should it be static?

PATCH kernel test robot 1 participant 1 message May 9, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f48887a98b78880b7711aca311fbbbcaad6c4e3b
commit: 42ac41dbc5726beff7c0957f15f0a887f70da199 [9587/9729] tsm-mr: Add tsm-mr sample code
config: x86_64-randconfig-r112-20250508 (https://download.01.org/0day-ci/archive/20250509/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> samples/tsm-mr/tsm_mr_sample.c:17:3: sparse: sparse: symbol 'sample_report' was not declared. Should it be static?

vim +/sample_report +17 samples/tsm-mr/tsm_mr_sample.c

    10	
    11	struct {
    12		u8 static_mr[SHA384_DIGEST_SIZE];
    13		u8 config_mr[SHA512_DIGEST_SIZE];
    14		u8 rtmr0[SHA256_DIGEST_SIZE];
    15		u8 rtmr1[SHA384_DIGEST_SIZE];
    16		u8 report_digest[SHA512_DIGEST_SIZE];
  > 17	} sample_report = {
    18		.static_mr = "static_mr",
    19		.config_mr = "config_mr",
    20		.rtmr0 = "rtmr0",
    21		.rtmr1 = "rtmr1",
    22	};
    23	
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki