From patchwork Thu Jun 6 06:32:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13687860 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 92D3FC27C52 for ; Thu, 6 Jun 2024 06:36:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E1896B00A4; Thu, 6 Jun 2024 02:36:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61EA26B00A2; Thu, 6 Jun 2024 02:36:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 18A056B00A5; Thu, 6 Jun 2024 02:36:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A7B196B00A2 for ; Thu, 6 Jun 2024 02:36:31 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5CC7E1204FD for ; Thu, 6 Jun 2024 06:36:31 +0000 (UTC) X-FDA: 82199504982.20.C6B54F6 Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by imf17.hostedemail.com (Postfix) with ESMTP id 1D18A40015 for ; Thu, 6 Jun 2024 06:36:28 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.35 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717655789; 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=oAdqwmoWzaCUMMqmLRFpSOTmOfuJ+JKVUuDePttXAWA=; b=cyp45MXhHymcPRwDN7szsYc/0eU7U7iiZFNZ7P2G4XohpW3a0ePkRpt74aqVVa5eNL8wNm 9HXTbJyCRtCOKU1NyvnnKYZuKXNhVmcnJeDtsGU2rX7cezg4ZaCIMGI+L8RtkAgQeVbu91 Qnnqrp9bjRfBbM1a52ch/St3dxIAprA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717655789; a=rsa-sha256; cv=none; b=c3RD/F7q7VJjfXBV33sY03El0B/4erIrG/uhMl5/Mf/if6gFCO8cYSlf4kNDIi8MTh9RhW as9yzHMP3ROjdz3f88B0e5yyauwJfbIhQyjv22casbiLlshaiYaF2DZC0ihXRG/xyTIDem oXC0HzEXscIWgCh857L4GQAX3B3DihA= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.35 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Vvvdl5g3Fz1S6Hn; Thu, 6 Jun 2024 14:32:43 +0800 (CST) Received: from canpemm500002.china.huawei.com (unknown [7.192.104.244]) by mail.maildlp.com (Postfix) with ESMTPS id 447E9140109; Thu, 6 Jun 2024 14:36:26 +0800 (CST) Received: from huawei.com (10.173.135.154) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 6 Jun 2024 14:36:25 +0800 From: Miaohe Lin To: , , CC: , , , , Subject: [PATCH v2 07/13] mm/memory-failure: simplify unneeded hwpoison_filter() variant Date: Thu, 6 Jun 2024 14:32:41 +0800 Message-ID: <20240606063247.712575-8-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240606063247.712575-1-linmiaohe@huawei.com> References: <20240606063247.712575-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.173.135.154] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 1D18A40015 X-Rspam-User: X-Stat-Signature: fz7g7hn3sz9prquusqohx3zzzq1xm553 X-HE-Tag: 1717655788-509685 X-HE-Meta: U2FsdGVkX1/i3cSzKrD25zmWptzixaPN1nRRMOueDz4YD95xFIzclX4bE8oTebOYbDw9uzNl1AS36s7azomHZl4jv+1iQw1WYX4lCCPywH8POhQGJLGe9FpcNi5fyjtYjkhSgklwqaeeCIfxuQXsywai62imvVL7oM27XKDnEHvmrmg6F5naw/S/VMHnfxNv6TnyKHiMZT2d+Z9r3QlA5nKvJjDrQngXO2BHRQc/75DSehwyEPGj8rHnI+cq0AXG/n47kDj3l124nwOwKQ/nHJA1NkLNlxRAL8tJk1Tp9naeyMlR/HG01mOJjyyLh5hg3WkzvylhbVpQD+yOc+FG8FwblBcaVr8vNIzj1i+n6GWAmofwFiVNc7NJNqQVQBEJLFNJr87m3xlcCTKOMKF087Q9XodZ/RQKc5QFY47MEuIy3cMAAQcpX/Eo/KXPeU6eTcXr/sPxrg6rDEL0opcBRmzQzht7CwsYlDg0TyWg2MzxPca2lIsDNm8/AYnd8NRa0aMvkfIyRGSKUXcHRLt79xlqH3y/dpIuNbCP/DkMC08rxURr2ollmeFipwURTJV/dW8I79a07UDGLB70n9d+2oNExKNMbYXRJDYctduM4JLZJyf+iUSR3o3P+pdcA98Re4YBnU1NU0r8f8aHDJol0WS7z+HCoZdwPe1Jz43M9Gk30mkwLUPfqAR52GfFJw0rEvEIg/5KOVTuqNs2VViaZCKMysPKRArNfyOjsl9Qesx0i2VzrdOfj6LBsDs9S1l5Fzc/cBnM/cFhL++KgT0gT7+2PNuTIvDq1ocaOU80GJCD9Xz6LlvKKfS868X5WwHhYaLDbk7Jn6yqgc6gvck7+YTMIWqIB64u755VfIHTQSOflKrEaffYFXcbTmQPK9gwRZKQgdERgz7+1j97T5GQWBWW4ZfkH0ND28Fj1tiMDiwVHK1Gq1g2jKdeGQL5L/2+H8BPRn+pekNPaMg0gw+ V5h1O2kK MUIrzxq55gbEsITX+p6tbltmiiMNZZEjmQoHqgEg5IeqGWUbaUOzc/v6o20s+H7bxoRH9mxPhSLeVS2dgkbZBYhTkPRa4PNRoPzk/ftSKQZl9xeSdJ3a1CWeUxJXIlM9JG3WPWPVwTLFVeEEHYtGst0qR4Zk0y6P+mMmhNM/tpH4Y7aEnnasJT4Jw1n+VMPsm78Czt4Oe6f5a6X9fO1mJQ2wdbf/sCbJ9aXTil7eLqgXbK9b5JjgQK4xW9D+BOi5T0ICw6hA/GhyEtwXKndpQbypYEQQn9PUoFM1SdZTxnZX7kzm8bYh0TRdGOgQfrKrer1cB4lczZAJ5+oH2oUnSOAX05A== 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: When CONFIG_HWPOISON_INJECT is not enabled, there is no user of the hwpoison_filter() outside memory-failure. So there is no need to export it and we can further make it 'static' and 'inline'. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405242336.o1NEOrln-lkp@intel.com/ Signed-off-by: Miaohe Lin --- mm/memory-failure.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 339752d768d8..6e26b8b975e5 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -294,15 +294,14 @@ int hwpoison_filter(struct page *p) return 0; } +EXPORT_SYMBOL_GPL(hwpoison_filter); #else -int hwpoison_filter(struct page *p) +static inline int hwpoison_filter(struct page *p) { return 0; } #endif -EXPORT_SYMBOL_GPL(hwpoison_filter); - /* * Kill all processes that have a poisoned page mapped and then isolate * the page.