[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7be21e02-9ddc-4fea-9301-6f80eed5ad0e@arm.com>
Date: Fri, 31 May 2024 18:08:14 +0530
From: Dev Jain <dev.jain@....com>
To: Chengming Zhou <zhouchengming@...edance.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Anshuman.Khandual@....com
Subject: Re: [External] Re: [QUESTION] mm: Redundant const parameter?
Yes; Matthew just did a wider fix:
https://lore.kernel.org/all/20240531122904.2790052-1-willy@infradead.org/
On 5/31/24 18:00, Chengming Zhou wrote:
> On 2024/5/31 19:31, Dev Jain wrote:
>> I guess it would be better if I send this as a patch and wait for comments.
> Ah, you're right. I think it should be:
>
> return folio_test_workingset(slab_folio(slab));
>
> Right? Don't notice there isn't any build warning about this "const" discard.
>
> Thanks.
>
>> On 5/31/24 16:42, Dev Jain wrote:
>>> Hi Chengming,
>>>
>>> In mm/slub.c, you had defined slab_test_node_partial() to take a const parameter.
>>>
>>> Is there any point of taking in a const, when you are anyways typecasting it to
>>>
>>> a (struct folio *) from (const struct folio *) ? In fact, at the place where you call
>>>
>>> slab_test_node_partial(), the struct slab *slab is not const.
>>>
>>> Please comment.
>>>
>>>
>>> Thanks
>>>
>>> DJ
>>>
>>>
>>>
>>>
Powered by blists - more mailing lists