From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AAB2C433F5 for ; Fri, 27 May 2022 01:48:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233143AbiE0BsG (ORCPT ); Thu, 26 May 2022 21:48:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiE0BsE (ORCPT ); Thu, 26 May 2022 21:48:04 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E71513702C for ; Thu, 26 May 2022 18:48:02 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4L8SP73f2NzDqND; Fri, 27 May 2022 09:47:55 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 27 May 2022 09:48:00 +0800 Subject: Re: [PATCH] mm: use PAGE_ALIGNED instead of IS_ALIGNED To: CC: , , Muchun Song , Andrew Morton References: <20220526140257.1568744-1-bh1scw@gmail.com> From: Miaohe Lin Message-ID: Date: Fri, 27 May 2022 09:48:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20220526140257.1568744-1-bh1scw@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/5/26 22:02, bh1scw@gmail.com wrote: > From: Fanjun Kong > > The already provides the PAGE_ALIGNED macro. Let's > use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly. > > Signed-off-by: Fanjun Kong Reviewed-by: Miaohe Lin Thanks! > --- > mm/sparse-vmemmap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c > index f4fa61dbbee3..49cb15cbe590 100644 > --- a/mm/sparse-vmemmap.c > +++ b/mm/sparse-vmemmap.c > @@ -200,8 +200,8 @@ static int vmemmap_remap_range(unsigned long start, unsigned long end, > unsigned long next; > pgd_t *pgd; > > - VM_BUG_ON(!IS_ALIGNED(start, PAGE_SIZE)); > - VM_BUG_ON(!IS_ALIGNED(end, PAGE_SIZE)); > + VM_BUG_ON(!PAGE_ALIGNED(start)); > + VM_BUG_ON(!PAGE_ALIGNED(end)); > > pgd = pgd_offset_k(addr); > do { >