drivers/platform/x86/amd/hsmp.c:743 is_f1a_m0h() warn: always true condition '(boot_cpu_data.x86_model >= 0) => (0-255 >= 0)'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo head: d04e52b47ab62cf36fddaa0feb1c5508e420e48d commit: 66ba7fd3949c4262dbc51d79e233c71e55725dac [14/17] platform/x86/amd/hsmp: Non-ACPI support for AMD F1A_M00~0Fh config: x86_64-randconfig-161-20240128 (https://download.01.org/0day-ci/archive/20240129/[email protected]/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
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]/
New smatch warnings:drivers/platform/x86/amd/hsmp.c:743 is_f1a_m0h() warn: always true condition '(boot_cpu_data.x86_model >= 0) => (0-255 >= 0)'
Old smatch warnings:drivers/platform/x86/amd/hsmp.c:574 hsmp_metric_tbl_read() error: we previously assumed 'sock' could be null (see line 573)
vim +743 drivers/platform/x86/amd/hsmp.c
739
740 static inline bool is_f1a_m0h(void)
741 {
742 if (boot_cpu_data.x86 == 0x1A &&
> 743 (boot_cpu_data.x86_model >= 0x00 && boot_cpu_data.x86_model <= 0x0F))
744 return true;
745
746 return false;
747 }
748
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki