[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLIvGsEvXSoNDbKl@fedora>
Date: Fri, 29 Aug 2025 15:52:10 -0700
From: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
To: Yuanchu Xie <yuanchu@...gle.com>
Cc: Max Kellermann <max.kellermann@...os.com>, akpm@...ux-foundation.org,
david@...hat.com, axelrasmussen@...gle.com, willy@...radead.org,
hughd@...gle.com, mhocko@...e.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, lorenzo.stoakes@...cle.com,
Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org,
surenb@...gle.com
Subject: Re: [PATCH 01/12] mm/shmem: add `const` to lots of pointer parameters
On Fri, Aug 29, 2025 at 03:44:12PM -0500, Yuanchu Xie wrote:
> On Fri, Aug 29, 2025 at 1:32 PM Max Kellermann <max.kellermann@...os.com> wrote:
> >
> > For improved const-correctness.
> >
> > Signed-off-by: Max Kellermann <max.kellermann@...os.com>
> Reviewed-by: Yuanchu Xie <yuanchu@...gle.com>
>
> Appreciate the work. On a side note, Andrew previously mentioned[1]
> making the actual parameter value const (which is different from
> adding the const qualifier to the pointer). Longer function
> readability would benefit from that, but it's IMO infeasible to do so
> everywhere.
+1
> [1] https://lore.kernel.org/lkml/20250827144832.87d2f1692fe61325628710f4@linux-foundation.org/#r
Imo the lack of these value const's isn't a blocker, but it'd be nice to
do that "For improved const-correctness". Especially when you're changing the
line anyways (see mapping_tagged() or folio_contains()).
Powered by blists - more mailing lists