Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp444097rwn; Thu, 15 Sep 2022 00:47:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR5uxW6rL8HriSfdcmgqjgs/MpQ9GgcAm42zbFPrlTvXB4GK7mS2y97v8McJq3xQslRTzpq0 X-Received: by 2002:a17:907:97d1:b0:780:26c9:1499 with SMTP id js17-20020a17090797d100b0078026c91499mr5677688ejc.371.1663228039718; Thu, 15 Sep 2022 00:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663228039; cv=none; d=google.com; s=arc-20160816; b=m+c/JwSjhDkKYY/LHGMnOcPpp9dMy/8VsgGNH+d6C9eqR7AVIbRJd9ngwV4r1YE+tV Odw8E90/2zl2JX3wGffTfSDgMxxOzu1sDKKwAFsxnm1QVZU4PaltiAOW0O4XG5gOWOSt BBo6pCwXeQftEnGPgx02qi8OIWp4bK4Hio6oGdc2VAkk07DitzCa4ouK3qGhI0EFt8AN 6+0BqY322Skn1Mnp43FpJaFd4EC0CqfTE5iD3SGMIDYnF2P57D9DMIxpgHbWFA38PF41 mrEO+z0IIv4uIaU3hNXBhXjVrNF0sWls62gSYoCp0g1v23y7F0nun/uKB8JNtRCmxQEO WIJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=h1+vhlSW9vfPnyz5X0nnqGP7dW92tQoYBZ6ShdfGobQ=; b=WaRfvqv8bTYsMJUWf+hVok4N+D1vKAAjlIUpsZBdb5CjpIxGl38m9JWNoejQW8Cx5F gUrYcGbQ3LnQeFucdSzEF3CecH7IwMEF/TLGlgBDmZVTP2Tpyrt0HPvJxUAcM6OcVTad +rzZyy5PbnposVN92mUgrDRdxN6wsavMqwlqhHr7lG+gviGc1mgFhV2NmnddyFuSfxN5 L7L4UGwgVR01Gno9KP86HhKa2Jw2RyGnhvOR59VoHgD6bJwraEh9ukbAYoppm0/7fscz dfJX0u1sUFa2h1tIQocdNXvLzQW8NBkguISp+LuyYf5qZ/tfH9bB91vGGT2xMu5BvcUb kOYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=fFGemjSz; dkim=neutral (no key) header.i=@suse.de header.b=CWQcbNtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ed13-20020a056402294d00b00451ecf8c2fasi6660732edb.394.2022.09.15.00.46.54; Thu, 15 Sep 2022 00:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=fFGemjSz; dkim=neutral (no key) header.i=@suse.de header.b=CWQcbNtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbiIOHgV (ORCPT + 99 others); Thu, 15 Sep 2022 03:36:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbiIOHgO (ORCPT ); Thu, 15 Sep 2022 03:36:14 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65D788C47D for ; Thu, 15 Sep 2022 00:36:11 -0700 (PDT) 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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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