Re: [PATCH v3] mm/page_alloc: Simplify free_page_is_bad by removing free_page_is_bad_report

From: Oscar Salvador
Date: Thu Mar 27 2025 - 06:58:35 EST


On Wed, Mar 26, 2025 at 09:24:34AM +0800, Ye Liu wrote:
> From: Ye Liu <liuye@xxxxxxxxxx>
>
> Refactors the free_page_is_bad function by directly calling bad_page()
> instead of using the intermediary function free_page_is_bad_report().
> The removal of free_page_is_bad_report() reduces unnecessary indirection,
> making the code cleaner and easier to read.
>
> The functionality remains the same, as free_page_is_bad_report() was
> merely a wrapper for the bad_page() call. The patch also improves
> maintainability by reducing the function call depth.

I would trim this down.

>
> Signed-off-by: Ye Liu <liuye@xxxxxxxxxx>
> Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>

Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>


--
Oscar Salvador
SUSE Labs