[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YyLV50jxlqq5GKtJ@localhost.localdomain>
Date: Thu, 15 Sep 2022 09:36:07 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Miaohe Lin <linmiaohe@...wei.com>
Cc: akpm@...ux-foundation.org, david@...hat.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/16] mm/page_alloc: use local variable zone_idx directly
On Fri, Sep 09, 2022 at 05:24:44PM +0800, Miaohe Lin wrote:
> Use local variable zone_idx directly since it holds the exact value of
> zone_idx(). No functional change intended.
>
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
By the way, zone_idx being "int" should be enough?
Reviewed-by: Oscar Salvador <osalvador@...e.de>
> ---
> mm/page_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 94baf33da865..3417232afa45 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -6878,7 +6878,7 @@ void __ref memmap_init_zone_device(struct zone *zone,
> unsigned long start = jiffies;
> int nid = pgdat->node_id;
>
> - if (WARN_ON_ONCE(!pgmap || zone_idx(zone) != ZONE_DEVICE))
> + if (WARN_ON_ONCE(!pgmap || zone_idx != ZONE_DEVICE))
> return;
>
> /*
> --
> 2.23.0
>
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists