From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCCF4ECAAA1 for ; Thu, 15 Sep 2022 07:36:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F6428D0001; Thu, 15 Sep 2022 03:36:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A6086B0073; Thu, 15 Sep 2022 03:36:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26CE38D0001; Thu, 15 Sep 2022 03:36:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 156926B0071 for ; Thu, 15 Sep 2022 03:36:11 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E31871C5BDF for ; Thu, 15 Sep 2022 07:36:10 +0000 (UTC) X-FDA: 79913511300.10.81AB153 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf07.hostedemail.com (Postfix) with ESMTP id 7B9A840094 for ; Thu, 15 Sep 2022 07:36:10 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 419175CE82; Thu, 15 Sep 2022 07:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1663227369; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h1+vhlSW9vfPnyz5X0nnqGP7dW92tQoYBZ6ShdfGobQ=; b=fFGemjSzG23aGrp5T9dEYL0S+HfetsY4S7oLMIYtVufTf/8IfI2CKnHzzESbfWsz9jXadr tL6mmpULkFlYxU1+pDTSMDbGDwwKfzVF3IhpsxQPORyaN7hRv/+5BTPZnjudwpb1YjCW78 vjOD1pCtyco4oIUPCkQxOfFFXEYYya0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1663227369; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h1+vhlSW9vfPnyz5X0nnqGP7dW92tQoYBZ6ShdfGobQ=; b=CWQcbNtMyo8YAOpvZ2C2PS8ryQBv6Wze8zMHfucg+XXPZuHng4bWMKk29Bd5SDbxB2ksTM sRwpTdXac01W7KBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DECF9133A7; Thu, 15 Sep 2022 07:36:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id XKm0M+jVImNZZQAAMHmgww (envelope-from ); Thu, 15 Sep 2022 07:36:08 +0000 Date: Thu, 15 Sep 2022 09:36:07 +0200 From: Oscar Salvador To: Miaohe Lin Cc: akpm@linux-foundation.org, david@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/16] mm/page_alloc: use local variable zone_idx directly Message-ID: References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-10-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220909092451.24883-10-linmiaohe@huawei.com> ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fFGemjSz; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CWQcbNtM; spf=pass (imf07.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663227370; a=rsa-sha256; cv=none; b=BZWkWRKNS8jpRXPA5rGyNW/w8ua3Ut9U58CBSSu06LTQfr1cisy8pvMVnwH6qobyjFR6kV uYpy8R6X7l1aCjs6QVezbiTVV7SvI8W3knFK3XhnmRZBgV5Yh4+3eCpIjK7EQdoeg+YZba AO2x6CdbkxInKe6YwhZr1w8XIZdzQ+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663227370; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=h1+vhlSW9vfPnyz5X0nnqGP7dW92tQoYBZ6ShdfGobQ=; b=lqW1I6Sb/kCoA7mmIHHWBLKNasgQPh+74x+gXe2B2Nx0xvCBDczqxDWsrUWA59TsrTbuV5 u5QLVk1SdE49N4pzBMqR1b+PduwkzD57I4JJBYTLr/ooWD2i4QWDPSs9uttvLCEg6PTVvy Zk2AwduQZehRXUs4nsECxz4lc0m0EwE= X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 7B9A840094 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fFGemjSz; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CWQcbNtM; spf=pass (imf07.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-Stat-Signature: 15f6hst56pyg4rcb11m1iae7ed98j6q9 X-HE-Tag: 1663227370-405002 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 By the way, zone_idx being "int" should be enough? Reviewed-by: Oscar Salvador > --- > 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