From patchwork Thu Jul 13 17:26:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13311646 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 B928AC001DC for ; Thu, 13 Jul 2023 09:26:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 35E048D0007; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BF938D0006; 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 09C6A8D0007; Thu, 13 Jul 2023 05:26:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E85C18D0005 for ; Thu, 13 Jul 2023 05:26:04 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C6E81AFF0D for ; Thu, 13 Jul 2023 09:26:04 +0000 (UTC) X-FDA: 81006057048.19.E4C5749 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf18.hostedemail.com (Postfix) with ESMTP id BCA1B1C000F for ; Thu, 13 Jul 2023 09:26:01 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=none (imf18.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689240363; a=rsa-sha256; cv=none; b=7mdpIHzSyDkhSKyJZwGqpLtI9A+EejNS6GsiZTSJaNtHjTxrkbUxlbHB0p447RyvQvLISQ VSaSBAFoy0GzY0hNqcRkULQcacy007vo5ZKYrytrlOsTAM1M9sW+SZg9K5TaQfJ/by2jyn BXgKZzmt8o3abB7+dx0FVIlGCYRJaIk= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=none (imf18.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=v0AMiqKWlfUNL1FDQGobXi+jVe/zewxzXTBRkWdIAJE=; b=Z0rxd6nUDZbMRHCoWwhmgkTQVGpjA+KgPRXrtBcQNOS9bTw7U5H9qY2QUb3BPBGqdg33Sv Hkyv+W/c0E2s/Jw2KVdugWDAB4iTqj8kfjptE6pQdbNUe0l2qCa24szYlfkGKhpQxWdN/p fy8waiIS81ivdmTJNdmFoEXs6WSZhrE= Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R1q3Q1cZYz4f3lKk 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--.13397S8; 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 6/8] mm/page_table_check: remove unused parameter in [__]page_table_check_pte_set Date: Fri, 14 Jul 2023 01:26:34 +0800 Message-Id: <20230713172636.1705415-7-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--.13397S8 X-Coremail-Antispam: 1UD129KBjvJXoWxCFyrWr4Uuw17JFWrXF17GFg_yoWrur4DpF n8C3saqrW5W34Yqr10krs0vryxtrs8WFWxtryxGanYvw15Kw18XFyDJrZxAayrGa4kuasx GFWFgrnrJr42qr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUm214x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0 rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6x IIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xv wVC2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFc xC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_ Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2 IErcIFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AK xVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67 AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IY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RpEy3+dmlvZO/F6s2zkRLpzAPJqfgulqEl6O0Xw8/iTRml01tQ/KfMrumnQYTstCK04GyzWcnE6U3wsb6byAp3AnrV9igdUaa0C92ynAaobAxEIh4VYQA9wmddaOJkEaUaRMs9OkDdYXyDsR3kUM//HF/uR4ZYw1wiLo9IRv9AVOEX+CrFetnMnGARMnU4cWh67Kv/LIwi0IIZpSnctOkA8hOzZjSGz7wRNsHmJXBO2YHuQ9bZJtikGMVgYR4fn1u4TsdY0a13B2BDTmSgynIKJKe V/56aiQa qMoIAvoePx/cmYHiygrSDZlxqWG8vtBiWW/EI69cYmNe+pAu+4Xi8xc8BgB4HfXR9pfV+qA5bC+Gai2sXtHJQ/zu3tdsVGN0hYgvB4FS5BtPATXwST98S+2GIHRm+WB6GrU1EkJUJ68PVxowcvHk+3rJvdzuhwfRU90wfA0EgCPqUvXluBdbTTZI50HYzu1i8lSZuQyDX1Nt6voDe7Y5ORD72mS09pMEpWwBhTTOZl4GdcpGpNy1sBzgOuoNIkTT77z0tDhIAYU03eZbjPcQnUOxaLHFG8SK0bYXpPCkx0y2HIuOmlQaXcD3qgm09nhM5/1S+ 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_pte_set and page_table_check_pte_set. Signed-off-by: Kemeng Shi --- arch/arm64/include/asm/pgtable.h | 2 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/x86/include/asm/pgtable.h | 2 +- include/linux/page_table_check.h | 11 ++++------- mm/page_table_check.c | 3 +-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 6e3387ec6013..f0a8dcbca04a 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -348,7 +348,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { - page_table_check_pte_set(mm, addr, ptep, pte); + page_table_check_pte_set(mm, ptep, pte); return __set_pte_at(mm, addr, ptep, pte); } diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 388c3af8a9f9..90063afe8d36 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -499,7 +499,7 @@ static inline void __set_pte_at(struct mm_struct *mm, static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) { - page_table_check_pte_set(mm, addr, ptep, pteval); + page_table_check_pte_set(mm, ptep, pteval); __set_pte_at(mm, addr, ptep, pteval); } diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index f07c610c3458..d14f0d92f04b 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1023,7 +1023,7 @@ static inline pud_t native_local_pudp_get_and_clear(pud_t *pudp) static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { - page_table_check_pte_set(mm, addr, ptep, pte); + page_table_check_pte_set(mm, ptep, pte); set_pte(ptep, pte); } diff --git a/include/linux/page_table_check.h b/include/linux/page_table_check.h index 5c9dc848a1bc..63ebd9fcf28b 100644 --- a/include/linux/page_table_check.h +++ b/include/linux/page_table_check.h @@ -17,8 +17,7 @@ void __page_table_check_zero(struct page *page, unsigned int order); 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, unsigned long addr, - pte_t *ptep, pte_t pte); +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_pud_set(struct mm_struct *mm, unsigned long addr, @@ -67,14 +66,13 @@ static inline void page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) __page_table_check_pud_clear(mm, pud); } -static inline void page_table_check_pte_set(struct mm_struct *mm, - unsigned long addr, pte_t *ptep, +static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) { if (static_branch_likely(&page_table_check_disabled)) return; - __page_table_check_pte_set(mm, addr, ptep, pte); + __page_table_check_pte_set(mm, ptep, pte); } static inline void page_table_check_pmd_set(struct mm_struct *mm, @@ -129,8 +127,7 @@ static inline void page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) { } -static inline void page_table_check_pte_set(struct mm_struct *mm, - unsigned long addr, pte_t *ptep, +static inline void page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) { } diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 2643135bf45c..fc20ddc3a63e 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -182,8 +182,7 @@ void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud) } EXPORT_SYMBOL(__page_table_check_pud_clear); -void __page_table_check_pte_set(struct mm_struct *mm, unsigned long addr, - pte_t *ptep, pte_t pte) +void __page_table_check_pte_set(struct mm_struct *mm, pte_t *ptep, pte_t pte) { if (&init_mm == mm) return;