Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9613683ybl; Fri, 17 Jan 2020 15:24:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyBEkve5Os5G4j+JAjdY6dLlmVTaGcgjLSvQJl8MTgTPG4u6CoT9eBzqgqosBCr7ZP0mfes X-Received: by 2002:a05:6830:154c:: with SMTP id l12mr7857276otp.275.1579303452853; Fri, 17 Jan 2020 15:24:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579303452; cv=none; d=google.com; s=arc-20160816; b=cbVtd1D7MwV1yNvyiLkI7pBqlt3t3nt3eZXKdIsMlqXaF9H6Xvh3oriu4yjkBqEGIR 31Fz9qQM1HvrKVtFuNgdRreD7Yau4aT9ENao4zpZGlN+FYCzT1o7//ZgSUe+UgUBvzSq ZoMzot7EMxsOTqyESMhIC9VOvloF1x46JlC7tAWDBsr2pdQY2kdmkzBN6shM8XuLGs/R UXkGMK0zRnHwH+NUPwA/UdyhbUvFl/KFi5v5gyleqWXyG28gUroykA/EUd09KW0BNYJI yxemKc0xHOP2CnkJ2FCR1m90s+bZ9S0P3l2ndPWblygaxBBy/uKCEeUKPf1Hz2cPLo9G aUrw== 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=VJ/Wv2uFPy9krT+yulX2loc0rfCFVeCdqAhQ+e177fjWVdwpMAbtGRw/IUGpvi++/U uHQE7dDepSO9FO65eMhKzSIDaZZnQ2k6UBLmOtDi0B5huxACimxucUMSBWj3NFZgl53T gRG7dYcA7n3Z4spONC7hY/IJwqxlW5skllQO6w7cS9WtfMCdIuyNfMg2dLINU4g+g+KB 4dONXYSokz2Ss5vzXcOPQzYDntc6HdRE/Af2o+dAg9JQrNyiciNQ9nuwzFOUEB1a/aOw /FO+cePg3xRc3zQkCI8iw7peWa0m3fR08JSOgi9OLxiZIFs7xCYREmrg0jCvA6jpP+E9 wc1w== 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 n11si14783694otk.290.2020.01.17.15.24.01; Fri, 17 Jan 2020 15:24:12 -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 S1730294AbgAQXXF (ORCPT + 99 others); Fri, 17 Jan 2020 18:23:05 -0500 Received: from mga06.intel.com ([134.134.136.31]:9953 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729099AbgAQXXE (ORCPT ); Fri, 17 Jan 2020 18:23:04 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2020 15:23:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,332,1574150400"; d="scan'208";a="306388155" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga001.jf.intel.com with ESMTP; 17 Jan 2020 15:23:02 -0800 From: Wei Yang To: akpm@linux-foundation.org, dan.j.williams@intel.com, aneesh.kumar@linux.ibm.com, kirill@shutemov.name, yang.shi@linux.alibaba.com, richardw.yang@linux.intel.com, thellstrom@vmware.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 1/5] mm/mremap: format the check in move_normal_pmd() same as move_huge_pmd() Date: Sat, 18 Jan 2020 07:22:50 +0800 Message-Id: <20200117232254.2792-2-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200117232254.2792-1-richardw.yang@linux.intel.com> References: <20200117232254.2792-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