RE: [PATCH 2/6] mm/page_alloc.c: simplify the code by using macro K()

From: David Laight
Date: Wed Sep 01 2021 - 17:25:48 EST


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.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)