Skip to contentSkip to conversation

include/linux/pageattr.h:123 cpa_is_direct_map() warn: always true condition '(addr >= 0) => (0-u64max >= 0)'

PATCH kernel test robot 1 participant 1 message Nov 26

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git generic-set-memory/rfc-v2
head:   dbcbe2371dba9ad17ac00779ddff74cbef500a77
commit: 287ccf3401cb64154113c9776b79576a93d0c398 [55/62] s390: use the generic CPA core
config: s390-randconfig-2200-20261126 (https://download.01.org/0day-ci/archive/20261126/[email protected]/config)
compiler: s390-linux-gcc (GCC) 16.2.0
smatch: v0.5.0-9187-g5189e3fb

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]/

smatch warnings:
include/linux/pageattr.h:123 cpa_is_direct_map() warn: always true condition '(addr >= 0) => (0-u64max >= 0)' mm/pageattr.c:373 split_large_page() warn: missing error code 'ret' include/linux/pageattr.h:123 cpa_is_direct_map() warn: always true condition '(addr >= 0) => (0-u64max >= 0)'

vim +123 include/linux/pageattr.h

ebb5b588a1dc24 Mike Rapoport (Microsoft  2026-11-17  119) 
69fb36148a23dd Mike Rapoport (Microsoft  2026-11-11  120) #ifndef cpa_is_direct_map
69fb36148a23dd Mike Rapoport (Microsoft  2026-11-11  121) static inline bool cpa_is_direct_map(unsigned long addr)
69fb36148a23dd Mike Rapoport (Microsoft  2026-11-11  122) {
69fb36148a23dd Mike Rapoport (Microsoft  2026-11-11 @123) 	return addr >= PAGE_OFFSET && addr < (unsigned long)high_memory;
69fb36148a23dd Mike Rapoport (Microsoft  2026-11-11  124) }
69fb36148a23dd Mike Rapoport (Microsoft  2026-11-11  125) #endif
69fb36148a23dd Mike Rapoport (Microsoft  2026-11-11  126) 

:::::: The code at line 123 was first introduced by commit
:::::: 69fb36148a23dd4d96dddd6ad37e429e68364cbe x86/mm/pat, mm: pull CPA core to mm/

:::::: TO: Mike Rapoport (Microsoft) <[email protected]> :::::: CC: Mike Rapoport (Microsoft) <[email protected]>

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki