Re: [PATCH] mm: add `const` to lots of pointer parameters
From: Max Kellermann
Date: Thu Aug 28 2025 - 08:41:28 EST
> On 28.08.25 14:24, Lorenzo Stoakes wrote:
> > On Wed, Aug 27, 2025 at 09:22:33PM +0200, Max Kellermann wrote:
> >> For improved const-correctness.
> >
> > 'const-correctness' in C is extremely weak.
"const correctness" is a commonly used term for this concept, and I
find your arguments against const-correctness "extremely weak". I
don't think discussing the benefits of const-correctness is worth the
time; the concept is trivial enough, and if you don't already agree,
there is no way I can convince you. Let's agree to disagree.
On Thu, Aug 28, 2025 at 2:29 PM David Hildenbrand <david@xxxxxxxxxx> wrote:
> I recall that Willy did some more targeted conversions of that kind in the past regarding folios.
And I found many more commits adding "const" to pointer parameters.
That shows this kind of patch is acceptable in the Linux kernel.
> I would appreciate similarly doing it in logical chunks.
So you suggest splitting the patch into many? I can do that, but will
it be merged then, or will Lorenzo be able block it? Will further
const-correctness changes from others (e.g. Willy) be rejected, too?