Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4302537ybl; Tue, 21 Jan 2020 17:18:21 -0800 (PST) X-Google-Smtp-Source: APXvYqye2RYd4MqaD0QgfU360ZIeZmiqGxTXv+IRsgR2t1ESnV3bhxReJeeIVC5KTYddeBeHTvxN X-Received: by 2002:aca:c692:: with SMTP id w140mr5305604oif.139.1579655901224; Tue, 21 Jan 2020 17:18:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579655901; cv=none; d=google.com; s=arc-20160816; b=k2Q9351d74raO2AWGrOm3feWnjQgW9/FZ7r5AmmwJuRZTsbDwoaMSL9907YpRkE+86 JCkxwWTIku6lBZx8f6j53zaSk26m5Gndl02BqYVm64wDp0FFJtWwGsNZENJzMNJjEnwU Jel6TmyCGgsSK6HU1F/w+BlFV1CVWoqCJeO0y8ZRW15pklOTjBZRgBzEvS4j5D8+IwU5 ZpdNIHzKqzsMqkSbKnkTHFmDjluysG2tQu1p6Qh5qVGr3kcoqo+jnG1NPHJraEEeMVKV 6daEBV9v4Ete2vjk30N60x8Pq5M/SFV+4f1Wh5Ef7fvc5X2uLjfKuv3XLa6ryAQB5Do9 1v6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=uHm2jnrxAUyx5dXW5B5HP/qxmWm7gurT3ImU+rs+X0Q=; b=PQly1rjXie7sX/KArOvjhMcm0wq+7Cwp7oIeaqE7p35H+ONa0ZAwqrasIWvGoCszLC eUSnDsCxZ+PtBYtd27nmCS7OMZ+0S6K95IgqIAmmajkNj1sC1qswoxwiQmNmkuSWHwkV LW0Wp7dEPQ9/hkiixho7KuDophh+Om+QP41l0LGDndfaXIug6A8PkJ9D1ith/jOWkUtE 66FWb/ex77AllU2XDmUWsBhP2Rf6ta/zzyuEVbJcT8cSPAKO0g/LxtyeNkmTCf+61LTy L2KrUOP2/K3HDhHU7T4snUvV1mCRW0/fxDNDNDI7UtNwMPwG61C7ffsjZVYweaBmJefx P9dw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si23878669otk.179.2020.01.21.17.18.09; Tue, 21 Jan 2020 17:18:21 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729083AbgAVBRL (ORCPT + 99 others); Tue, 21 Jan 2020 20:17:11 -0500 Received: from mga06.intel.com ([134.134.136.31]:24737 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728900AbgAVBRJ (ORCPT ); Tue, 21 Jan 2020 20:17:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 17:17:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,347,1574150400"; d="scan'208";a="244885500" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga002.jf.intel.com with ESMTP; 21 Jan 2020 17:17:07 -0800 From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, mhocko@suse.com, yang.shi@linux.alibaba.com, rientjes@google.com, Wei Yang Subject: [Patch v2 1/4] mm/migrate.c: not necessary to check start and i Date: Wed, 22 Jan 2020 09:16:44 +0800 Message-Id: <20200122011647.13636-2-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200122011647.13636-1-richardw.yang@linux.intel.com> References: <20200122011647.13636-1-richardw.yang@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Till here, i must no less than start. And if i equals to start, store_status() would always return 0. Remove some unnecessary check to make it easy to read and prepare for further cleanup. Signed-off-by: Wei Yang Acked-by: Michal Hocko --- mm/migrate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 430fdccc733e..4c2a21856717 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1661,11 +1661,9 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes, err = do_move_pages_to_node(mm, &pagelist, current_node); if (err) goto out; - if (i > start) { - err = store_status(status, start, current_node, i - start); - if (err) - goto out; - } + err = store_status(status, start, current_node, i - start); + if (err) + goto out; current_node = NUMA_NO_NODE; } out_flush: -- 2.17.1