[PATCH] mm/zswap: mark zswap_stored_incompressible_pages as static

From: SeongJae Park
Date: Thu Aug 21 2025 - 12:10:57 EST


Only zswap.c uses zswap_stored_incompressible_pages, but it is not
marked as static. This incurs a sparse warning that reported by kernel
teset robot. Mark it as a static variable to eliminate the warning.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202508211706.DnJPQQMn-lkp@xxxxxxxxx/
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
mm/zswap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/zswap.c b/mm/zswap.c
index 5dd282c5b626..ee443b317ac7 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -45,7 +45,7 @@
/* The number of pages currently stored in zswap */
atomic_long_t zswap_stored_pages = ATOMIC_LONG_INIT(0);
/* The number of incompressible pages currently stored in zswap */
-atomic_long_t zswap_stored_incompressible_pages = ATOMIC_LONG_INIT(0);
+static atomic_long_t zswap_stored_incompressible_pages = ATOMIC_LONG_INIT(0);

/*
* The statistics below are not protected from concurrent access for
--
2.39.5