Re: [PATCH v2] pagevec.h: add `const` to pointer parameters of getter functions
From: Lorenzo Stoakes
Date: Thu Aug 28 2025 - 09:28:25 EST
+cc missing people.
Again, please run scripts/get_maintainers.pl and cc the right people, thanks.
On Thu, Aug 28, 2025 at 03:03:11PM +0200, Max Kellermann wrote:
> For improved const-correctness.
>
> Signed-off-by: Max Kellermann <max.kellermann@xxxxxxxxx>
This is fine, so:
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> ---
> 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
>