From patchwork Thu Oct 20 07:59:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 13012767 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 475A5C433FE for ; Thu, 20 Oct 2022 08:00:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C90D86B0071; Thu, 20 Oct 2022 04:00:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C40316B007B; Thu, 20 Oct 2022 04:00:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2EBD6B007D; Thu, 20 Oct 2022 04:00:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A7CDE6B0071 for ; Thu, 20 Oct 2022 04:00:03 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 699C080D3F for ; Thu, 20 Oct 2022 08:00:03 +0000 (UTC) X-FDA: 80040579486.07.B6A02FB Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf28.hostedemail.com (Postfix) with ESMTP id 49650C0040 for ; Thu, 20 Oct 2022 08:00:01 +0000 (UTC) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MtKdg5TP0zVj1v; Thu, 20 Oct 2022 15:55:19 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 20 Oct 2022 15:59:53 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 20 Oct 2022 15:59:52 +0800 From: Yang Yingliang To: CC: , , Subject: [PATCH -next] mm/ksm: change break_ksm_pmd|pud_entry() to static Date: Thu, 20 Oct 2022 15:59:13 +0800 Message-ID: <20221020075913.1046481-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666252803; a=rsa-sha256; cv=none; b=M6DAzxv6bVM4K3+rTS0F+jXvJaJqZvreT52qaWa2yCYKXT0gUGY5pCpgz4ZOb8JoVpxYw0 i8AVZElOBkYULuiE3IPAEHp/zzCQ4kA0aH/4+jv+ijl2Sc6Pq9KLZ4Kgm8Q7xprYyely6K u8+7fK+OVL9fNdcRwglYTgwVF4lV6zs= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of yangyingliang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=yangyingliang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666252803; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=MVuejZGjzGvXcUWHxPkiNj4nWh7PzFfXxvqSf741IQ8=; b=2eYLbVRmorJuc3B1HX4NhlZsW7ok4PPTY4jk4fRaRv1PJfDF58V87juferGmSvPKcUlNk7 VhcAIkuoBFaEdPJzgMTqGZIR3ZUKq/jQfBSvOzbuTzQ9EAJ1wiWa6c9Vk/+1pPZp0NDwgB B8JFy0ks0Hwk1F/LvyVsiolBYV8UEuo= X-Stat-Signature: 1caaxf54fgqdj7fhxuot1rmh81ug9pq9 X-Rspamd-Queue-Id: 49650C0040 X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of yangyingliang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=yangyingliang@huawei.com X-Rspamd-Server: rspam11 X-HE-Tag: 1666252801-733385 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: break_ksm_pmd|pud_entry() is only used in ksm.c now, change them to static. Fixes: 16ee05ec4698 ("mm/ksm: convert break_ksm() to use walk_page_range_vma()") Signed-off-by: Yang Yingliang --- mm/ksm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/ksm.c b/mm/ksm.c index 570a23a0e5d9..c35054311e18 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -420,7 +420,7 @@ static inline bool ksm_test_exit(struct mm_struct *mm) return atomic_read(&mm->mm_users) == 0; } -int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next, +static int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next, struct mm_walk *walk) { /* We only care about page tables to walk to a single base page. */ @@ -429,7 +429,7 @@ int break_ksm_pud_entry(pud_t *pud, unsigned long addr, unsigned long next, return 0; } -int break_ksm_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long next, +static int break_ksm_pmd_entry(pmd_t *pmd, unsigned long addr, unsigned long next, struct mm_walk *walk) { bool *ksm_page = walk->private;