[PATCH v3 0/3] mm: Coccinelle-driven cleanups across memory management code

Sahil Chandna
2025-11-27T05:11:45Z

This patch series contains three minor cleanups identified by
Coccinelle scripts under scripts/coccinelle/misc/:

* Replace manual ternary expression with the min() macro in pagewalk.c
and change return expression for clarity.
* Use the %pe printk format specifier for PTR_ERR() reporting
in vmscan.c and zswap.c
Found using:
make coccicheck MODE=report M=mm/

changes since v1 and v2:
- Patch 1/3: update return value as per review comments.
- patch 2/3 and 3/3: Add Acked-by and Reviewed-by tags.

link to v1: https://lore.kernel.org/all/cover.1763227530.git.chandna.sahil@gmail.com/
link to v2: https://lore.kernel.org/all/cover.1763796152.git.chandna.sahil@gmail.com/

Sahil Chandna (3):
mm: pagewalk: simplify hugepage boundary calculation using min()
mm/vmscan: use %pe to print error pointers
mm/zswap: use %pe to print error pointers

mm/pagewalk.c | 3 +--
mm/vmscan.c | 4 ++--
mm/zswap.c | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)

--
2.50.1