From patchwork Wed Mar 11 01:18:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 11430537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0D2714BC for ; Wed, 11 Mar 2020 01:18:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AD21020727 for ; Wed, 11 Mar 2020 01:18:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MeAnMQzL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD21020727 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1E13E6B0003; Tue, 10 Mar 2020 21:18:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 16AA16B0006; Tue, 10 Mar 2020 21:18:32 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 081106B0007; Tue, 10 Mar 2020 21:18:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id DFE9E6B0003 for ; Tue, 10 Mar 2020 21:18:31 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9C469180AD81D for ; Wed, 11 Mar 2020 01:18:31 +0000 (UTC) X-FDA: 76581321222.24.brain70_4a6b1c37d8c0c X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,bhe@redhat.com,,RULES_HIT:30054:30070,0,RBL:207.211.31.120:@redhat.com:.lbl8.mailshell.net-62.18.0.100 66.10.201.10,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: brain70_4a6b1c37d8c0c X-Filterd-Recvd-Size: 2852 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Mar 2020 01:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583889510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=UN0NuvLW7G+cpN7mBoVO9U+atcx/0hxSlzgtOKjyR/Y=; b=MeAnMQzLs5JByPiXDz9Q2U7oM90eljE6NNBpmFKTESCYHCjtfYq0eGpMYjH4hoxkdd2ieW BP2PgodJDRbKNpjtCJsfUsnnBAIk7q8pZNhUpxyZzvCkZpoGJanHFhmA/yqPXyTWAvBp0+ 33RQ2mOXU7cbtphgb/APYmuVdzRx+Dw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-145-N22v_7SrOxmD1S135QGAKQ-1; Tue, 10 Mar 2020 21:18:28 -0400 X-MC-Unique: N22v_7SrOxmD1S135QGAKQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F3308017DF; Wed, 11 Mar 2020 01:18:27 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-39.pek2.redhat.com [10.72.12.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09D8926195; Wed, 11 Mar 2020 01:18:24 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, x86@kernel.org, mhocko@suse.com, akpm@linux-foundation.org, bhe@redhat.com Subject: [PATCH v2] x86/mm: Remove the redundant conditional check Date: Wed, 11 Mar 2020 09:18:23 +0800 Message-Id: <20200311011823.27740-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: In commit f70029bbaacb ("mm, memory_hotplug: drop CONFIG_MOVABLE_NODE"), the dependency on CONFIG_MOVABLE_NODE was removed for N_MEMORY. Before commit f70029bbaacb, CONFIG_HIGHMEM && !CONFIG_MOVABLE_NODE could make (N_MEMORY == N_NORMAL_MEMORY) be true. After commit f70029bbaacb, N_MEMORY doesn't have any chance to be equal to N_NORMAL_MEMORY. So the conditional check in paging_init() doesn't make sense any more. Let's remove it. Signed-off-by: Baoquan He Acked-by: Michal Hocko Reviewed-by: Wei Yang --- v1->v2: Update patch log to make the description clearer per Michal's suggestion. arch/x86/mm/init_64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index abbdecb75fad..0a14711d3a93 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -818,8 +818,7 @@ void __init paging_init(void) * will not set it back. */ node_clear_state(0, N_MEMORY); - if (N_MEMORY != N_NORMAL_MEMORY) - node_clear_state(0, N_NORMAL_MEMORY); + node_clear_state(0, N_NORMAL_MEMORY); zone_sizes_init(); }