From patchwork Thu Jan 20 04:25:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12718247 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 239D0C433FE for ; Thu, 20 Jan 2022 04:25:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA6EB6B00C8; Wed, 19 Jan 2022 23:25:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C075C6B00C6; Wed, 19 Jan 2022 23:25:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD0706B00C8; Wed, 19 Jan 2022 23:25:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id 9DA446B00C4 for ; Wed, 19 Jan 2022 23:25:20 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4EFE8181A2923 for ; Thu, 20 Jan 2022 04:25:20 +0000 (UTC) X-FDA: 79049376000.24.1F1D362 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by imf22.hostedemail.com (Postfix) with ESMTP id F0A76C0013 for ; Thu, 20 Jan 2022 04:25:19 +0000 (UTC) Received: by mail-qt1-f178.google.com with SMTP id w6so4315325qtk.4 for ; Wed, 19 Jan 2022 20:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=y7IBEFcOTZK1CyuqmdTSoA/WSm/rs2AzBzr4xeRbGk4=; b=cP4MRZVN3XS/Hv+4xVejRohrtY7eWhls6EeKtXKO4HEeZoBodcI8sJ3xjHKFm70JUO GOILpJJKMku8FMRco38M2XxNrQ3llQ6nlbmn4kLPAuunEYXWUZCP6iupyYGhZoGylgYn VVxbLPGmi2UseBBddwmDeApHQ6oG35Z8Cl9i1SxnXv4Ts6hutw3/Bo78JiROOyWn2dOQ 46AG77KO7iiByksR54vPpIIQYFqIR50aL6Gp+tj/UmoKeVU0Lm1M9ykxCEaNheyPQ5BT uv4iuIUZD696lO4zpJJBuZgLzkSwzL1LCMOqQH8s1atbsUTMU8QwZ4FtkGxQxBFhlB3a CZew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y7IBEFcOTZK1CyuqmdTSoA/WSm/rs2AzBzr4xeRbGk4=; b=uBsxrvF4ahXGx1F89w39zZYEBDjbrpUl1X84ca5RahQ9Z1nKFC2NUpZfth9vQH8DXn QHCJmdBvtWkoKu3InjNTfNjXlmipQmWuG4rGmg/B7p56t3a/AxzWbLjhp9eOzZRZRBlG Zjd941pSeW2Winu7aB2+4WmbswpNMuZ4LqZW4ocx2/Nu3eSDnoANx0xIoaiVuFv7i3Cv ZbYSYh5YO3Djmf1ZgbSUP/3yLccK/NK91QmHJ5X+WfMAD678/K9yu65Toh/LBwgR4H0Y ZDH84cyHumROpGz2zVKTrjOVtEOzzfhNUUZmNOhJDM8QCXDAyAl0z7xyZVwzZkbdrc7N ds4g== X-Gm-Message-State: AOAM532sQ9Rnmm9iTn9eUvlMiuxzmZkbjBKJhJE/VND55+NjgO1FFFiW 81rXCn3wLQlRVDJVXAYhFAHc0g== X-Google-Smtp-Source: ABdhPJzXnIXjyCxa1o9CUucEgZlUWjvyPBMb3mux6mDsG/2GD/N9CkUGpolKakTZ0SXWX3g03RR0ZQ== X-Received: by 2002:ac8:5d94:: with SMTP id d20mr27466383qtx.214.1642652719229; Wed, 19 Jan 2022 20:25:19 -0800 (PST) Received: from soleen.c.googlers.com.com (189.216.85.34.bc.googleusercontent.com. [34.85.216.189]) by smtp.gmail.com with ESMTPSA id n22sm927228qka.46.2022.01.19.20.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 20:25:18 -0800 (PST) From: Pasha Tatashin To: pasha.tatashin@soleen.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, rientjes@google.com, pjt@google.com, weixugc@google.com, gthelen@google.com, mingo@redhat.com, will@kernel.org, rppt@kernel.org, dave.hansen@linux.intel.com, hpa@zytor.com, aneesh.kumar@linux.ibm.com, jirislaby@kernel.org, songmuchun@bytedance.com, qydwhotmail@gmail.com, hughd@google.com, ziy@nvidia.com, anshuman.khandual@arm.com Subject: [PATCH 3/3] mm/page_table_check: use unsigned long for page counters Date: Thu, 20 Jan 2022 04:25:13 +0000 Message-Id: <20220120042513.1648831-4-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.34.1.703.g22d0c6ccf7-goog In-Reply-To: <20220120042513.1648831-1-pasha.tatashin@soleen.com> References: <20220120042513.1648831-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: F0A76C0013 X-Stat-Signature: tkwqzdk7tz3g4d5dqd38uzyx3zsxpc83 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=cP4MRZVN; spf=pass (imf22.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.160.178 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=none X-HE-Tag: 1642652719-847755 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: For the consistency, use "unsigned long" for all page counters. Signed-off-by: Pasha Tatashin Reviewed-by: Wei Xu --- mm/page_table_check.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 2341ac382cd5..22dd285ab8d5 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -86,8 +86,8 @@ static void page_table_check_clear(struct mm_struct *mm, unsigned long addr, { struct page_ext *page_ext; struct page *page; + unsigned long i; bool anon; - int i; if (!pfn_valid(pfn)) return; @@ -121,8 +121,8 @@ static void page_table_check_set(struct mm_struct *mm, unsigned long addr, { struct page_ext *page_ext; struct page *page; + unsigned long i; bool anon; - int i; if (!pfn_valid(pfn)) return; @@ -186,10 +186,10 @@ static void pmd_clear_level(struct mm_struct *mm, unsigned long addr, void __page_table_check_zero(struct page *page, unsigned int order) { struct page_ext *page_ext = lookup_page_ext(page); - int i; + unsigned long i; BUG_ON(!page_ext); - for (i = 0; i < (1 << order); i++) { + for (i = 0; i < (1ul << order); i++) { struct page_table_check *ptc = get_page_table_check(page_ext); BUG_ON(atomic_read(&ptc->anon_map_count));