From: Max Kellermann Date: Thu, 28 Aug 2025 13:03:11 +0000 (+0200) Subject: pagevec.h: add `const` to pointer parameters of getter functions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e332f303ae93ba4d38b480b1bb5a08f833306f6;p=thirdparty%2Fkernel%2Fstable.git pagevec.h: add `const` to pointer parameters of getter functions For improved const-correctness. Link: https://lkml.kernel.org/r/20250828130311.772993-1-max.kellermann@ionos.com Signed-off-by: Max Kellermann Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Lorenzo Stoakes Acked-by: SeongJae Park Reviewed-by: Vishal Moola (Oracle) Cc: David Hildenbrand Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 5d3a0cccc6bf8..63be5a4516276 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; }