From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here
Date: Fri, 19 Dec 2025 07:45:20 +0800 [thread overview]
Message-ID: <202512190721.gzPIti0c-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Deepak Gupta <debug@rivosinc.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd9b004b7ff3289fb7bae35130c0a5c0537266af
commit: 2a3ebad4db63e86a9443d6bff4a5977320dc09f6 riscv: mm: add soft-dirty page tracking support
date: 3 weeks ago
:::::: branch date: 2 hours ago
:::::: commit date: 3 weeks ago
config: riscv-randconfig-r071-20251219 (https://download.01.org/0day-ci/archive/20251219/202512190721.gzPIti0c-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202512190721.gzPIti0c-lkp@intel.com/
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:466 pte_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
vim +481 arch/riscv/include/asm/pgtable.h
9e953cda5cdf1c Alexandre Ghiti 2019-05-26 458
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 459 #ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 460 #define pgtable_supports_soft_dirty() \
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 461 (IS_ENABLED(CONFIG_MEM_SOFT_DIRTY) && \
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 462 riscv_has_extension_unlikely(RISCV_ISA_EXT_SVRSW60T59B))
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 463
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 464 static inline bool pte_soft_dirty(pte_t pte)
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 465 {
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 @466 return !!(pte_val(pte) & _PAGE_SOFT_DIRTY);
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 467 }
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 468
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 469 static inline pte_t pte_mksoft_dirty(pte_t pte)
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 470 {
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 471 return __pte(pte_val(pte) | _PAGE_SOFT_DIRTY);
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 472 }
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 473
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 474 static inline pte_t pte_clear_soft_dirty(pte_t pte)
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 475 {
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 476 return __pte(pte_val(pte) & ~(_PAGE_SOFT_DIRTY));
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 477 }
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 478
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 479 static inline bool pte_swp_soft_dirty(pte_t pte)
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 480 {
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 @481 return !!(pte_val(pte) & _PAGE_SWP_SOFT_DIRTY);
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 482 }
2a3ebad4db63e8 Chunyan Zhang 2025-11-13 483
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-12-18 23:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 23:45 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-02 6:23 arch/riscv/include/asm/pgtable.h:481 pte_swp_soft_dirty() warn: bitwise AND condition is false here kernel test robot
2026-08-20 6:07 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202512190721.gzPIti0c-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.