Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp994839ybl; Tue, 28 Jan 2020 16:29:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwIhp9ttxFKJXUuiJ1mEfLLsZGTjoN1wp4254vr/svFK9Hle7QJd8NZiz2KHQJU360ask3h X-Received: by 2002:a05:6808:907:: with SMTP id w7mr4811828oih.91.1580257757887; Tue, 28 Jan 2020 16:29:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580257757; cv=none; d=google.com; s=arc-20160816; b=hnk5xWt8j/4ggulByZaYwolnFMovFEKZOHeLeFeHdCGnSX7mEcwOGw8oxvlC2oCg8D p/y9UF9mx6cxVOKibtJ8KdPwQMyZhK+ohTa/p7AFkw1tSPaUqZ3vzP9yfSdk9giZCcQa k77LuD2o7bNRL73cUGFP2R60g4IsOx6NA2SxJkYqUEOzr+LekkENgxjSsjS4ebk67h6u 2v1laa8XhHBq/qE0tGODFvDuJgevt0ewW+GRABTU1UcU6+b3xLkMVP32fzut+M+uGaqD LBWzC6IzK/x3ZfG+Nk8cgSpuqPpEW42TErJAALcQvdRWmiPmU0pixh7ID1kBpA+jFHee reAg== 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=77ZpeAmVo3bUUTbI4D6g8XiA7cgQdC6VqM61c1KYX6w=; b=eeCHWdXWY8bL+YG60fKQCA9sKm0n2pdeAfQB2lO5Wtuow7eeFcGI/ZbpHoR0gtd2nQ Y7c5IF+JIOm3LfIZ3dF3q9TEFg2n2SJ5GbDOfHQPZ7mAhDg3buM9jbBt5xMt7QMBC9JK BiPwQdq0/IaofdyX37I/3sFc7xdduinkpUmJ+CVlhlkJFCorSWSxJPeUQGO60T2ftLtX Tq9O8Vkxem63eIGHEqn33ujN0NDWr2R8tePxVlFPNRp/aIj+L8WW3Km5wugxkGJLWoJA 4Je8g0/3w/WGzJbOwtsGh5ZVNgAvrT675Ig+hsKxZB52jd1mZAeQOz1rZKA07l9A44kd gQAw== 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 k1si236478oic.245.2020.01.28.16.29.02; Tue, 28 Jan 2020 16:29:17 -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 S1726514AbgA2A1K (ORCPT + 99 others); Tue, 28 Jan 2020 19:27:10 -0500 Received: from mga11.intel.com ([192.55.52.93]:12087 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbgA2A1J (ORCPT ); Tue, 28 Jan 2020 19:27:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jan 2020 16:27:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,375,1574150400"; d="scan'208";a="229456090" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga003.jf.intel.com with ESMTP; 28 Jan 2020 16:27:06 -0800 From: Wei Yang To: akpm@linux-foundation.org, aneesh.kumar@linux.ibm.com, kirill@shutemov.name, dan.j.williams@intel.com, yang.shi@linux.alibaba.com, thellstrom@vmware.com, richardw.yang@linux.intel.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, digetx@gmail.com Subject: [Patch v2 1/4] mm/mremap: format the check in move_normal_pmd() same as move_huge_pmd() Date: Wed, 29 Jan 2020 08:26:39 +0800 Message-Id: <20200129002642.13508-2-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200129002642.13508-1-richardw.yang@linux.intel.com> References: <20200129002642.13508-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 No functional change, just improve the readability and prepare for following cleanup. Signed-off-by: Wei Yang --- mm/mremap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/mremap.c b/mm/mremap.c index 122938dcec15..bcc7aa62f2d9 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -200,8 +200,9 @@ static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr, struct mm_struct *mm = vma->vm_mm; pmd_t pmd; - if ((old_addr & ~PMD_MASK) || (new_addr & ~PMD_MASK) - || old_end - old_addr < PMD_SIZE) + if ((old_addr & ~PMD_MASK) || + (new_addr & ~PMD_MASK) || + old_end - old_addr < PMD_SIZE) return false; /* -- 2.17.1