From patchwork Mon Jan 8 04:48:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Li X-Patchwork-Id: 13513004 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 12BEDC3DA6E for ; Mon, 8 Jan 2024 04:48:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E19B6B006E; Sun, 7 Jan 2024 23:48:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 06B946B0071; Sun, 7 Jan 2024 23:48:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9B736B0072; Sun, 7 Jan 2024 23:48:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D36E06B006E for ; Sun, 7 Jan 2024 23:48:50 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 935E4140794 for ; Mon, 8 Jan 2024 04:48:50 +0000 (UTC) X-FDA: 81654913620.24.46A7836 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf23.hostedemail.com (Postfix) with ESMTP id 928D6140005 for ; Mon, 8 Jan 2024 04:48:47 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1704689328; 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=s1ZllOp5vDkOvjnVYdi6i925Wc14tGmvL4RSOdL0XTc=; b=bwEGU2ii8BVOcnNxUm0H3wXiO3MKNE0rRL6by+UHWRSB7kFEpzn2aNdA8xB3X8JSap3oEG khUC7Tj+2gqmkh/8Vef5+X6OfnEviu1sLk+nBlMjlzObQ887Z75uCEw4L4CAH/HfWKUPZc wzABqiaLOLmqma7UCKXCnGIMMcRTJNQ= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704689328; a=rsa-sha256; cv=none; b=wP/L90U0zK5JhhKSm3SDOowKVddM3bFmCvBG5cSH/Iwbh8aWTWQtIn9Orq2T51mQchEsvR 6SSTLXvU3C6V9MaJryya+0rXrvO189V0Mu3IOeN9EmfBkFisVw4TpaEDRvHll9iQOuVpx1 66lvMGQDkA3OCkdQpqGKPMjri+2CCK8= Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4T7hQ94ytcz1Q7Dk; Mon, 8 Jan 2024 12:48:01 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 1EE9C140384; Mon, 8 Jan 2024 12:48:43 +0800 (CST) Received: from huawei.com (10.90.53.73) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 8 Jan 2024 12:48:42 +0800 From: Hongbo Li To: , , CC: , , , Subject: [PATCH -next] mm/filemap: avoid type conversion Date: Mon, 8 Jan 2024 12:48:15 +0800 Message-ID: <20240108044815.3291487-1-lihongbo22@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500022.china.huawei.com (7.185.36.66) X-Rspamd-Queue-Id: 928D6140005 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 3yd6u8gk9cb3e7gkgizsicztq95a557m X-HE-Tag: 1704689327-955472 X-HE-Meta: U2FsdGVkX1+5MUXzO+Mb8GVO4FJNbilqG0nNzw2V9OmrG8i6uW5ZPnxN/DDb3rd6X484UyFJjIYtikxaxD4MFTEBYKBBmrui2ggd28gSLlscBQqwkW9VxmJRY4cVNaydvmIVwAjq8pKGJt/iJI8EOw2/gKRf5nC5Vn9AXwHUrpq6FAqWmYFARVxIgzkvDqU01KreDUIpp9A336d1shfsCOe06xxOGYrFvOpxYWFvURWCf/NeL+m9AVfpEnoLqkXfV3x4Ety0ZbqkfHkAkcZu+y/6fCpDrF0xoijuPPU907Yq63LGPW55hOKVIqGiR2dGf75v97mUAUIKuUrbFYZNhvuyw/K4xraiXdM75r13DoUGbUEmq+3mtrd9SxQPGU7nEy5uOoqxTh+gFzxtPzGQscIM8jDxUU1obTpKohztMCLdLESzbz0fLr9mh0SFCpF7ab26u6T9ZCHUc8y4fnOsytytVqyVEdwJT6M6E4O3Sv+lfQYfgM4VSLxQ4C9+6kZ6/6tpF98iBWqil65VpzcaeqyX1XTcvfP2jGz50+jsYSoxYAIdAzq3SFR38UFYZ4Wltl/dDxbqZgUAteeYEFsaWBdS33/h5glSNpeZ/a4tv3vM7SWMeWvaRCrSPjYUQg6d9xgGofmHaao+qkVkQ7WwfkLlvrq5v0YkO1Ly4Vl0dKgEZaQfUYnEdjKqXJfia+7Ju1gapRVOlZ1Fue2ILQDiuWBolbAy5otzIGwCs5jEXLiyBlxItrvm2u+ioaYQ9gnZAywvPiNIQUNDoKGHP8x/3aoTsIa27vIV7dQddJJZGkZCBQ8wH3GXIZTLXEgaB2eRKq1E0ur8KQV6DMIdNS4c6mK27B5REyEQHdnMrjCMBINVDMDNMPqlj2zj9wogzSNx/k8ndTwHpyqfxut0LqY6a/avVK9ogX7HTy3jfGZgQLVYqsatj4q9T+knXE5M3jPTK0Y/hzNX2MRfrw0w+HB Ox3HbFRU ljXhw/rq3yn4NVH9ynStMK/VPNyfOJOpx6jhrNyK3TuAr+d/Eymdgj+3TzGONU2p40zRivS0LyGMuypv+XlS9NGSI1vuHE2rSCjHzuqPMZ5hQNDdugLyxcIkNNHR89KmIe0kVY3EKCUhIN8o= 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: List-Subscribe: List-Unsubscribe: The return type of function folio_test_hugetlb is bool type, there is no need to assign it to an integer type. Signed-off-by: Hongbo Li Reviewed-by: Matthew Wilcox (Oracle) --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 750e779c23db..0d7e20edf46f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -843,7 +843,7 @@ noinline int __filemap_add_folio(struct address_space *mapping, struct folio *folio, pgoff_t index, gfp_t gfp, void **shadowp) { XA_STATE(xas, &mapping->i_pages, index); - int huge = folio_test_hugetlb(folio); + bool huge = folio_test_hugetlb(folio); bool charged = false; long nr = 1;