include/linux/tpm_eventlog.h:165:6: warning: variable 'mapping_size' set but not used

kernel test robot
2025-02-26T17:05:32Z

Hi Matthew,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ac9c34d1e45a4c25174ced4fc0cfc33ff3ed08c7
commit: c46f3405692de1ac82240d927b9c7a0f9d6a4a36 tpm: Reserve the TPM final events table
date: 6 years ago
config: x86_64-buildonly-randconfig-006-20250127 (https://download.01.org/0day-ci/archive/20250227/202502270159.BdFzuxvF-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250227/202502270159.BdFzuxvF-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502270159.BdFzuxvF-lkp@intel.com/

All warnings (new ones prefixed by >>):

In file included from drivers/char/tpm/tpm_tis.c:30:
In file included from drivers/char/tpm/tpm.h:29:
>> include/linux/tpm_eventlog.h:165:6: warning: variable 'mapping_size' set but not used [-Wunused-but-set-variable]
165 | int mapping_size;
| ^
1 warning generated.
--
In file included from drivers/char/tpm/tpm-chip.c:24:
>> include/linux/tpm_eventlog.h:165:6: warning: variable 'mapping_size' set but not used [-Wunused-but-set-variable]
165 | int mapping_size;
| ^
drivers/char/tpm/tpm-chip.c:422:11: warning: cast from 'void (*)(struct device *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict]
422 | (void (*)(void *)) put_device,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
--
In file included from drivers/char/tpm/eventlog/tpm1.c:24:
>> include/linux/tpm_eventlog.h:165:6: warning: variable 'mapping_size' set but not used [-Wunused-but-set-variable]
165 | int mapping_size;
| ^
drivers/char/tpm/eventlog/tpm1.c:253:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
253 | int len = 0;
| ^