From patchwork Thu Jul 13 17:26:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311648 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 598A4EB64DD for ; Thu, 13 Jul 2023 09:26:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AFE978D0009; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C6498D0006; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74E068D000A; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 368518D0008 for ; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F3010140168 for ; Thu, 13 Jul 2023 09:26:04 +0000 (UTC) X-FDA: 81006057048.14.F718025 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf27.hostedemail.com (Postfix) with ESMTP id 76C1840004 for ; Thu, 13 Jul 2023 09:26:01 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; spf=none (imf27.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689240363; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MqZRHafPCEkUNTVRqtf54NZEiRYiYt4Df+IOIxcA8oU=; b=UxLLmrZDXUnnHEQUq+jT4OFdFTI4ByW22TrP3g1uC4IWoQ1uKyQnpinX2VHEYLXY7c+7KC rQ80PsrjH0ikPwjPlVo8rWoqnSxSIoKB+UYm8ktgc5m27AANzNlX4xT/bSLj8UyRdqQe20 3Tone/UaeG/fH5qyKbv2vZdZuMiI6p8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240363; a=rsa-sha256; cv=none; b=K8WzIU3lNSguw8Af2x1JXHmlscKA/sME2l5p36J7JFxvJdaqYE5SQ+e6l6BFFnRUfksQvL G0XWJDtsRPu8e2Pd8gyUqVJHTYimFKFdoFuV3O2xdcFzdTahHKOGp3yKiLIObKQbQ7Xoco FQxrzL6nv+vARhvtIsI1r7ZpdY5jK3Y= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=none (imf27.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R1q3Q3Rv2z4f3lY2 for ; Thu, 13 Jul 2023 17:25:54 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDHu+khw69kr7cmNw--.13397S9; Thu, 13 Jul 2023 17:25:56 +0800 (CST) From: Kemeng Shi To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 7/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_set Date: Fri, 14 Jul 2023 01:26:35 +0800 Message-Id: <20230713172636.1705415-8-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230713172636.1705415-1-shikemeng@huaweicloud.com> References: <20230713172636.1705415-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: Syh0CgDHu+khw69kr7cmNw--.13397S9 X-Coremail-Antispam: 1UD129KBjvJXoW3Ww13XFW7JFW7AF4kJF1rtFb_yoW7ur1xpF s8t3ZYqr45W34Yq3yrArsYvryftFs8GFWftry3GanYv3W5Kr48XFyDJ39xZa95Ga48u393 GFWYqF9xGw12grUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUm214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AK xVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVF xhVjvjDU0xZFpf9x0pRvJPtUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Stat-Signature: ksszu54urczoqxsx6azbi6fzy994h39y X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 76C1840004 X-Rspam-User: X-HE-Tag: 1689240361-441329 X-HE-Meta: U2FsdGVkX191ZCO/hofqH2GtsmP3E4fv9MCZdmcB3UQTq1JoPszMgODqC5wB9eZQzelIDTxhvJy7ndJkJWmaA8dmXqf0eRaDIjeQeZuUATmsqPmVDSf+Wfa5csCrM1Xnjz2rKPw07td3VhoXPxnbo5L7F2TLYP9Ff7S+UuzKzd9Q1a/n/ksGmIlMljjFp6mAgJmcY2IjOKmX24uih8JfRQmskX6szpm4EupKmSJI37/1XX+rfBC5MHq0wDOHeYcbGeXkbKQ3ig2TRBkB64OKTXXce1wjtSBHKsbfq9jQMVW8DiziM+s2ZzvjxtHlxb4Ym2jHW65BJJ5cmjAyn885vXoU7zrtv86mkJGiYTFiJIGB05N6yXlxPY+iSHZBr2ninN9hMFglaNCwVy3/2r+w0d03Lx+GJf16TWfDw7SVdf2fnyflxv3VoIwT0g/U/hJLsdG0EaG6zym63oqOa+Sl1dbt8SAxc0z2lG0m/ff9uOwS+ND1c/2tA/miJ3WDxNpyEGncOd9vZ8L+AfqpBD8AYg6Rnb+p8IOm3VQzFOPUw4ocXnSAA59ZETpFgRqy9PC7Izsmjg27LKvChjqNONra5gTbodHgAjg++x50Ldr5nmS0up3Ipojkrw7+Dsxn/+lMFUFO7hRtH628cf/cACNAwlXFm+dbFvokVnCapnQJxcJ4ibo3+CliWfm2RwILa+LLI5hA/QctbBjxbxfwReIhxlB2JGoaTkY0w+JeEEzbRyTORdKZuKE8ToXQWfU+EQk8RWpF28Od2bmLsEmVVmC20FHUmr/BoyQ/iHHiMjUkDQzj9+Ye4TTWBlXWWNETezqdHfnggQcAMk1FrojU/1mKZj7akFarnfAmrOH3BnK51cXaGaj2kvlMOmDWH2yk7zqBRLFt13L0XJ4eKHxxjqwuZMODkd6nGc9wxWANPtcgj/4o4sax7yU+3sVI6x1hoJgh2bzQOtORNsdwgg/8wiX 5Y0pDve5 9DCif5ozkN5dAnM1/woV+lGwuHsodffYuN/4gX2ptHcDbQPw84VpS4oOAhfsdv4fS0Sp1OJQKWP6IXVYjsQz1gvALl32lIrmF61gdfoV39DzIEAerzqx+fSI65/xCC5N0D7r2hyFct9cDhLLatZLTbiltJzdLRCajb37NLoI2S57RVKQ+SfTqgYUXzeLK+ZbXlOwqrbQl2NR3dsIIeB1rJgOObklVGbCSiAs+/E+bo1Izf1UrCULxxdMMlcv5Q7nhllAeRr5XpXHPtAyqjLDh05WMKzw4l/7RlaqlGk8DW13kd2e0G3SzPdWIlcnDeM2jdatw 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: Remove unused addr in __page_table_check_pmd_set and page_table_check_pmd_set. Signed-off-by: Kemeng Shi --- arch/arm64/include/asm/pgtable.h | 4 ++-- arch/riscv/include/asm/pgtable.h | 4 ++-- arch/x86/include/asm/pgtable.h | 4 ++-- include/linux/page_table_check.h | 11 ++++------- mm/page_table_check.c | 3 +-- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index f0a8dcbca04a..1fbf8d3f42b1 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -524,7 +524,7 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd) static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(mm, addr, pmdp, pmd); + page_table_check_pmd_set(mm, pmdp, pmd); return __set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)); } @@ -976,7 +976,7 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, static inline pmd_t pmdp_establish(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(vma->vm_mm, address, pmdp, pmd); + page_table_check_pmd_set(vma->vm_mm, pmdp, pmd); return __pmd(xchg_relaxed(&pmd_val(*pmdp), pmd_val(pmd))); } #endif diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 90063afe8d36..a30658b2611b 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -687,7 +687,7 @@ static inline pmd_t pmd_mkdirty(pmd_t pmd) static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(mm, addr, pmdp, pmd); + page_table_check_pmd_set(mm, pmdp, pmd); return __set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)); } @@ -758,7 +758,7 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, static inline pmd_t pmdp_establish(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(vma->vm_mm, address, pmdp, pmd); + page_table_check_pmd_set(vma->vm_mm, pmdp, pmd); return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd))); } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index d14f0d92f04b..9cc26cb0bc9f 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1030,7 +1030,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(mm, addr, pmdp, pmd); + page_table_check_pmd_set(mm, pmdp, pmd); set_pmd(pmdp, pmd); } @@ -1167,7 +1167,7 @@ static inline int pud_write(pud_t pud) static inline pmd_t pmdp_establish(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t pmd) { - page_table_check_pmd_set(vma->vm_mm, address, pmdp, pmd); + page_table_check_pmd_set(vma->vm_mm, pmdp, pmd); if (IS_ENABLED(CONFIG_SMP)) { return xchg(pmdp, pmd); } else { diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index 63ebd9fcf28b..dd58dfb0e643 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -18,8 +18,7 @@ void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte); void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud); void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte); -void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, - pmd_t *pmdp, pmd_t pmd); +void __page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd); void __page_table_check_pud_set(struct mm_struct *mm, unsigned long addr, pud_t *pudp, pud_t pud); void __page_table_check_pte_clear_range(struct mm_struct *mm, @@ -75,14 +74,13 @@ static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, __page_table_check_pte_set(mm, ptep, pte); } -static inline void page_table_check_pmd_set(struct mm_struct *mm, - unsigned long addr, pmd_t *pmdp, +static inline void page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pmd_set(mm, addr, pmdp, pmd); + __page_table_check_pmd_set(mm, pmdp, pmd); } static inline void page_table_check_pud_set(struct mm_struct *mm, @@ -132,8 +130,7 @@ static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, { } -static inline void page_table_check_pmd_set(struct mm_struct *mm, - unsigned long addr, pmd_t *pmdp, +static inline void page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) { } diff --git a/mm/page_table_check.c b/mm/page_table_check.c index fc20ddc3a63e..033956704a64 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -195,8 +195,7 @@ void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) } EXPORT_SYMBOL(__page_table_check_pte_set); -void __page_table_check_pmd_set(struct mm_struct *mm, unsigned long addr, - pmd_t *pmdp, pmd_t pmd) +void __page_table_check_pmd_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd) { if (&init_mm == mm) return;