Re: [PATCH 06/12] mm/util: add `const` to several pointer parameters

From: Vishal Moola (Oracle)
Date: Fri Aug 29 2025 - 19:10:32 EST


On Fri, Aug 29, 2025 at 08:31:53PM +0200, Max Kellermann wrote:
> For improved const-correctness.
>
> Signed-off-by: Max Kellermann <max.kellermann@xxxxxxxxx>
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -549,7 +549,7 @@ static inline void filemap_nr_thps_dec(struct address_space *mapping)
> #endif
> }
>
> -struct address_space *folio_mapping(struct folio *);
> +struct address_space *folio_mapping(const struct folio *);

Can we make this (const struct folio *folio) like below. Its more
readable imo.

With or without that change, feel free to add:
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx>

> +struct address_space *folio_mapping(const struct folio *folio)
> {
> struct address_space *mapping;
>