[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250828130311.772993-1-max.kellermann@ionos.com>
Date: Thu, 28 Aug 2025 15:03:11 +0200
From: Max Kellermann <max.kellermann@...os.com>
To: akpm@...ux-foundation.org,
david@...hat.com,
lorenzo.stoakes@...cle.com,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: Max Kellermann <max.kellermann@...os.com>
Subject: [PATCH v2] pagevec.h: add `const` to pointer parameters of getter functions
For improved const-correctness.
Signed-off-by: Max Kellermann <max.kellermann@...os.com>
---
v1->v2: reduced patch to just pagevec.h upon David Hildenbrand's suggestion
---
include/linux/pagevec.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 5d3a0cccc6bf..63be5a451627 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -51,12 +51,12 @@ static inline void folio_batch_reinit(struct folio_batch *fbatch)
fbatch->i = 0;
}
-static inline unsigned int folio_batch_count(struct folio_batch *fbatch)
+static inline unsigned int folio_batch_count(const struct folio_batch *fbatch)
{
return fbatch->nr;
}
-static inline unsigned int folio_batch_space(struct folio_batch *fbatch)
+static inline unsigned int folio_batch_space(const struct folio_batch *fbatch)
{
return PAGEVEC_SIZE - fbatch->nr;
}
--
2.47.2
Powered by blists - more mailing lists