Re: [PATCH] mm: Replace (20 - PAGE_SHIFT) with common macros for pages<->MB conversion

From: Lorenzo Stoakes
Date: Fri Jul 18 2025 - 05:52:17 EST


On Fri, Jul 18, 2025 at 03:16:55PM +0530, Dev Jain wrote:
>
> On 18/07/25 8:11 am, Ye Liu wrote:
> > From: Ye Liu <liuye@xxxxxxxxxx>
> >
> > Replace repeated (20 - PAGE_SHIFT) calculations with standard macros:
> > - MB_TO_PAGES(mb) converts MB to page count
> > - PAGES_TO_MB(pages) converts pages to MB
> >
> > No functional change.
> >
> > Signed-off-by: Ye Liu <liuye@xxxxxxxxxx>
> > ---
>
> sh and x86 have their own pages_to_mb, drivers/target/target_core_user.c too.
> I guess no one likes to clean the kernel :)
>

*A wild Lorenzo appaers*