From patchwork Sat Jun 11 08:47:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12878373 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 54D8CC43334 for ; Sat, 11 Jun 2022 08:47:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 51A1A8D0111; Sat, 11 Jun 2022 04:47:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A3F58D0112; Sat, 11 Jun 2022 04:47:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F5418D0111; Sat, 11 Jun 2022 04:47:35 -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 19CC28D010E for ; Sat, 11 Jun 2022 04:47:35 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E86C735B9C for ; Sat, 11 Jun 2022 08:47:34 +0000 (UTC) X-FDA: 79565326428.13.2800558 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf19.hostedemail.com (Postfix) with ESMTP id C5D8F1A0060 for ; Sat, 11 Jun 2022 08:47:33 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LKryB44FLzgYGf; Sat, 11 Jun 2022 16:45:38 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 11 Jun 2022 16:47:30 +0800 From: Miaohe Lin To: CC: , , , , , , , , , , , Subject: [PATCH 6/7] mm/khugepaged: remove unneeded return value of khugepaged_add_pte_mapped_thp() Date: Sat, 11 Jun 2022 16:47:30 +0800 Message-ID: <20220611084731.55155-7-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220611084731.55155-1-linmiaohe@huawei.com> References: <20220611084731.55155-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654937254; 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:in-reply-to:references:references; bh=kgTyrgtD/vWHHcRC/0sprBGuCN/0gxyL+3T2gDCT8x8=; b=D0ycL+z7/8/yFEvslXhejngz8uOel1/0tgD4EM4gP/IPu9Xy1DBUa7fxqhZfNYJJ3K6m0C pV3+pcGw9PICMGdF+FS1pXsPJl7l/w9+XYAQAE2ltJEAt2A+mCtY/PiDrmArkgrNKA+Uw9 21LXSVhmlFjDdG1FqZzRSpGFMMW7GJM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654937254; a=rsa-sha256; cv=none; b=RX/i5fQw9HPcTP2UeVyA9obClEa4hb4rdh5cy50R4ZJPVIZSC/cl5zL9Vxd3A63BzVmKwN 1AfjifscSv+s4sTag3GaKucoj26OwDfpRyRvzL7H8m1336oDD5xHwrot1cdjuL32d2VJ7S 2D9847TmuU7YDmmCCSLi7wO6JOZ/Nw8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf19.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf19.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam03 X-Stat-Signature: rz3c9da1nxbi4d6sbap67pt34z1p9onx X-Rspamd-Queue-Id: C5D8F1A0060 X-HE-Tag: 1654937253-960092 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: The return value of khugepaged_add_pte_mapped_thp() is always 0 and also ignored. Remove it to clean up the code. Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi --- mm/khugepaged.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 142e26e4bdbf..ee0a719c8be9 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1372,7 +1372,7 @@ static void collect_mm_slot(struct mm_slot *mm_slot) * Notify khugepaged that given addr of the mm is pte-mapped THP. Then * khugepaged should try to collapse the page table. */ -static int khugepaged_add_pte_mapped_thp(struct mm_struct *mm, +static void khugepaged_add_pte_mapped_thp(struct mm_struct *mm, unsigned long addr) { struct mm_slot *mm_slot; @@ -1384,7 +1384,6 @@ static int khugepaged_add_pte_mapped_thp(struct mm_struct *mm, if (likely(mm_slot && mm_slot->nr_pte_mapped_thp < MAX_PTE_MAPPED_THP)) mm_slot->pte_mapped_thp[mm_slot->nr_pte_mapped_thp++] = addr; spin_unlock(&khugepaged_mm_lock); - return 0; } static void collapse_and_free_pmd(struct mm_struct *mm, struct vm_area_struct *vma,