Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp18755ybh; Tue, 10 Mar 2020 18:19:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtMW7G0WeumQXSBULy1L/tTFnEwzADQSYaoliIGgE5323/46jh9S3EWxfm1H6vJY1Fb0/6J X-Received: by 2002:aca:1108:: with SMTP id 8mr315677oir.93.1583889591043; Tue, 10 Mar 2020 18:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583889591; cv=none; d=google.com; s=arc-20160816; b=yxdApJIBVu/l8RGWUkt/OyLsdSXq/zSGlx/FRMhclQvu65W/JQyin/JQ4d2sjo1qce +ffZ+2tsF2ULn+IdLxwncFF/N02lGrXhNkOoAB6ERyyu9uwrtKfRegyh/HaMt4YLIw+c +9/Y5Gr9aFsv6Bdq/EX80xaAnj78iOHLIPevIYzT98u7naJc6+v9cc2o40erUwmAGrvG MiEl17Eg2FnMHfT+owsNOEiLR0y7o052jfPP7mkspNAETNKsSI7G6rC2b6Ex169UKT0u VpHrG7v0pdt4QhDwGCChKVTj1ieUaqL8pwhPT25i60pxtiy8R2OOecj9xMZ1p1/Hnv5m 7cwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=UN0NuvLW7G+cpN7mBoVO9U+atcx/0hxSlzgtOKjyR/Y=; b=Dp7Um4nxrbycVXBjxr11GJ3qz8eFCXw9t0IaT3OVcWWFJazLqPNNwfGXKvGxfhHk67 3k26WQpLpR0l/mzbaJQalsJIW2n36AqvdNnAm83/MS5fN35rVLi9B0XC1P3/NorDTsWz i0FOINLVRamvuSxAh6CqDxjNKyzlKhhBn2D/M+/MyT9TAzrqwo96NvKQXljYZ7kGS+A9 IbJ+zYj/0rABOgBuGaDrAV8EUPr4NOnnJWGrfWjPJ8MxCCb5wN6f+Vtrjr0+aDIKxaSM NqPxlUbLhqG/f3ovu2tUyoZNa9KMcArgeZPfUQAOvtJ5n/4CDXltAwP1otP/SKJvXVce V1tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LfwMqBEV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h145si316393oib.210.2020.03.10.18.19.38; Tue, 10 Mar 2020 18:19:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LfwMqBEV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727693AbgCKBSd (ORCPT + 99 others); Tue, 10 Mar 2020 21:18:33 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:21249 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727484AbgCKBSd (ORCPT ); Tue, 10 Mar 2020 21:18:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583889512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=UN0NuvLW7G+cpN7mBoVO9U+atcx/0hxSlzgtOKjyR/Y=; b=LfwMqBEVULFuRQTNRx7BEbHgH+1GmSjeRGyDm/nvy5PJEkE1//YVJYmiC4/7Svyuep+XKW R5VdlgtvVo3rxmqxlWdwBMnt0NKSpmVNxg4DHObZ3zjFT8pMRD7IU/8TdZHuymX8qkVzc5 QpBiRAea1nFdzHW5Gba6MC2rE1xOGRI= 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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(); } -- 2.17.2