[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f94e8b6b-39cf-3aac-8cd1-c8859e820f84@huawei.com>
Date: Thu, 2 Sep 2021 14:32:01 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: David Laight <David.Laight@...LAB.COM>,
Oleksandr Natalenko <oleksandr@...alenko.name>
CC: "vbabka@...e.cz" <vbabka@...e.cz>,
"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
"peterz@...radead.org" <peterz@...radead.org>,
"mgorman@...hsingularity.net" <mgorman@...hsingularity.net>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/6] mm/page_alloc.c: simplify the code by using macro K()
On 2021/9/2 5:25, David Laight wrote:
> From: Miaohe Lin
>> Sent: 01 September 2021 08:38
> ...
>>>>> Shouldn't this macro go to some header file instead to get rid of define
>>>>> repetitions?
>>>>
>>>> Many thanks for figuring this out. I think we should get rid of these
>>>> repetitions too. But I'am not sure where this definition should be. Any
>>>> suggestion? Thanks.
>>>
>>> I'm not sure what place suits best. At first I thought maybe linux/mm.h or
>>> linux/mm_inline.h, but since PAGE_SHIFT is declared in asm-generic/page.h,
>>> probably K(x) can also go there as well?
>>
>> K(x) is relevant with PAGE_SHIFT. So I think K(x) can also go asm-generic/page.h too.
>> Am I supposed to do this when free or will you kindly do this?
>
> It is a bit of a short name to go in a public header file.
>
It seems K(x) is a bit of short and it needs a more self-annotated name.
We can discuss this there:
https://lkml.org/lkml/2021/9/1/334
Thanks.
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
Powered by blists - more mailing lists