arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Chunyan Zhang <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Linux Memory Management List <[email protected]>
CC: Deepak Gupta <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb8a75eec0877810b50aa1c5a833f929525cd2ee
commit: 2a3ebad4db63e86a9443d6bff4a5977320dc09f6 riscv: mm: add soft-dirty page tracking support
date:   9 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 9 months ago
config: riscv-randconfig-r072-20260820 (https://download.01.org/0day-ci/archive/20260820/[email protected]/config)
compiler: riscv64-linux-gcc (GCC) 9.5.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
| Fixes: 2a3ebad4db63 ("riscv: mm: add soft-dirty page tracking support")
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

New smatch warnings:
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here

Old smatch warnings:
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/pgtable.h:466 pte_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:230 arch_atomic64_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/pgtable.h:466 pte_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/pgtable.h:466 pte_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/pgtable.h:466 pte_soft_dirty() warn: bitwise AND condition is false here
arch/riscv/include/asm/atomic.h:218 arch_atomic_fetch_add_unless() warn: inconsistent indenting

vim +481 arch/riscv/include/asm/pgtable.h

2a3ebad4db63e86 Chunyan Zhang 2025-11-13  478  
2a3ebad4db63e86 Chunyan Zhang 2025-11-13  479  static inline bool pte_swp_soft_dirty(pte_t pte)
2a3ebad4db63e86 Chunyan Zhang 2025-11-13  480  {
2a3ebad4db63e86 Chunyan Zhang 2025-11-13 @481  	return !!(pte_val(pte) & _PAGE_SWP_SOFT_DIRTY);
2a3ebad4db63e86 Chunyan Zhang 2025-11-13  482  }
2a3ebad4db63e86 Chunyan Zhang 2025-11-13  483  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.