From patchwork Tue Jan 12 02:19:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 59593 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2470240lbb; Mon, 11 Jan 2016 18:20:32 -0800 (PST) X-Received: by 10.98.40.2 with SMTP id o2mr10205350pfo.92.1452565232770; Mon, 11 Jan 2016 18:20:32 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89si32509363pfi.117.2016.01.11.18.20.32; Mon, 11 Jan 2016 18:20:32 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762236AbcALCU1 (ORCPT + 29 others); Mon, 11 Jan 2016 21:20:27 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:9216 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762193AbcALCUY (ORCPT ); Mon, 11 Jan 2016 21:20:24 -0500 Received: from 172.24.1.48 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.48]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DCW02390; Tue, 12 Jan 2016 10:20:09 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Tue, 12 Jan 2016 10:19:58 +0800 From: To: Ingo Molnar , "H. Peter Anvin" CC: Alexander Kuleshov , , Subject: [PATCH] x86/mm: use PAGE_ALIGNED instead of IS_ALIGNED Date: Tue, 12 Jan 2016 10:19:30 +0800 Message-ID: <1452565170-11083-1-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.569462DB.00FF, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c77639ef7486fb312038b7ed43df3036 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kefeng Wang Use PAGE_ALIGEND macro in to simplify code. Signed-off-by: Kefeng Wang --- arch/x86/mm/init_64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.6.0.GIT diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index ec081fe..8829482 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -814,8 +814,7 @@ remove_pte_table(pte_t *pte_start, unsigned long addr, unsigned long end, if (phys_addr < (phys_addr_t)0x40000000) return; - if (IS_ALIGNED(addr, PAGE_SIZE) && - IS_ALIGNED(next, PAGE_SIZE)) { + if (PAGE_ALIGNED(addr) && PAGE_ALIGNED(next)) { /* * Do not free direct mapping pages since they were * freed when offlining, or simplely not in use.