From patchwork Thu May 26 14:02:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FanJun Kong X-Patchwork-Id: 12862444 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACE76C433F5 for ; Thu, 26 May 2022 14:03:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 31EE68D0003; Thu, 26 May 2022 10:03:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2CD0B8D0001; Thu, 26 May 2022 10:03:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1BA9F8D0003; Thu, 26 May 2022 10:03:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0BD4D8D0001 for ; Thu, 26 May 2022 10:03:18 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id BE7196045F for ; Thu, 26 May 2022 14:03:17 +0000 (UTC) X-FDA: 79508061234.23.FE53564 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by imf25.hostedemail.com (Postfix) with ESMTP id 16096A00E7 for ; Thu, 26 May 2022 14:02:31 +0000 (UTC) Received: by mail-ot1-f46.google.com with SMTP id p12-20020a9d4e0c000000b00606b40860a3so1008304otf.11 for ; Thu, 26 May 2022 07:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xER5qd7NDHJpu21bf/QgYTxPeVwPuTdZeetijhnYaKY=; b=ZoWSLfhYUiiK/8XkSqjEkby5wMNctocjGlTkOpdBbIO1QaY2vum16sC1gBdHNgGi1Y ShUiHX6hftTluYaIeyEL6M0qCsKv8i2OeLLEYj3i1osUSfR3KnPfmw9vfsJxk7auMaI6 grK6pROBi7PdUTDh+pFse6U6Vqp+PyQ5U8PISz5X6bTNlzSRmmySssOM6vbqrxYFSgNJ 3vr1nWyHDuaQh29Vuc3akSyTStHPapH64avS2ANCf50u3b9dTok0m39igRkOuScJ2ZpI Aet9KTTabL8vg3+QubWRsNBo2pE3PXA+pUO9NeUWmUu7AAkVNnvD/e6TZF1H8/8Waukl N3Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xER5qd7NDHJpu21bf/QgYTxPeVwPuTdZeetijhnYaKY=; b=Utv3K7zVf+lzBrakEhxo5Jk2x56LZ1D0Sg97189Qx9wm5EzdIILaApQ4HfPp9Bmvo3 eYIUEgLoEz+Ey17AYxOn+1ffyKdocYWqMSnT6tEfnriko+ybPm44V1PWZ6+fEBhWZzu4 EEO6QqGRpzVQNRQ/WEdjBgddPtFV5RXELRFqfAIozGFQuAjOQCCJ/ci/DDxKqtGv1evb mrZ7JBWqAD6N7kwKHuXwZs6N60G6q4zsfsRbJ21AEeNaQpwwnX/nIqAhEZl0IHbsJQyg jQp/ZKh7Vet2T/KWXODxrZA4GgBvX0lAd78r/ybPspTRxzBCCTDBF+c5qIUUot6AgYv8 JsuQ== X-Gm-Message-State: AOAM531i5XOeVEwtS5D6hHjR7eNMI+YYBLFSpJRfzaUvfucsLVVDOb4+ KuxPFY3HKL1Jh4CkfUQPfL4= X-Google-Smtp-Source: ABdhPJw8h/iNW2cKl1ZPDKdZeuN5zOsSrx6KZwv97+IoAil0hgyghxwN2if3xWRvFuhrS9M2ZLr6bw== X-Received: by 2002:a9d:479a:0:b0:60b:359f:db6f with SMTP id b26-20020a9d479a000000b0060b359fdb6fmr2839841otf.67.1653573780601; Thu, 26 May 2022 07:03:00 -0700 (PDT) Received: from localhost ([199.180.249.178]) by smtp.gmail.com with ESMTPSA id b18-20020a4a9fd2000000b0035eb4e5a6b8sm679673oom.14.2022.05.26.07.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 07:03:00 -0700 (PDT) From: bh1scw@gmail.com To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song , Fanjun Kong Subject: [PATCH] mm: use PAGE_ALIGNED instead of IS_ALIGNED Date: Thu, 26 May 2022 22:02:57 +0800 Message-Id: <20220526140257.1568744-1-bh1scw@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 16096A00E7 X-Stat-Signature: fku77goncb8ta6awc995ttpmo7ye6h44 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZoWSLfhY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of bh1scw@gmail.com designates 209.85.210.46 as permitted sender) smtp.mailfrom=bh1scw@gmail.com X-Rspamd-Server: rspam04 X-HE-Tag: 1653573751-188983 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Acked-by: Muchun Song Reviewed-by: Miaohe Lin --- 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 {