From patchwork Mon Mar 13 05:39:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13171974 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 9A04FC61DA4 for ; Mon, 13 Mar 2023 05:19:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 187088E0001; Mon, 13 Mar 2023 01:19:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 137BA6B0072; Mon, 13 Mar 2023 01:19:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 025F48E0001; Mon, 13 Mar 2023 01:19:15 -0400 (EDT) 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 E6B126B0071 for ; Mon, 13 Mar 2023 01:19:15 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B3BDCA7358 for ; Mon, 13 Mar 2023 05:19:15 +0000 (UTC) X-FDA: 80562721470.18.3B7CE3A Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf29.hostedemail.com (Postfix) with ESMTP id 74023120018 for ; Mon, 13 Mar 2023 05:19:12 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf29.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678684753; 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=Qc+7l53T2AmwSlpMmFCb7oHAq0dzbh4QTSbD/vU/8Fw=; b=0NqikHmWhMHyj/z0T+Zjyr4OJeYDyTtUDHEZ4KUlVo2YUYLjdkmMQSqezH3xp9Ld6UcfHg b/WgWZuH9Juz5xcMt9OOZfHnl6mRhCXskr8UY+8Kmv0+YQBnLwJe11S4tcxMENEsxZTxlA W/UB6dn8VGAvD01cu9IzPHWMJ5zcObU= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf29.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678684753; a=rsa-sha256; cv=none; b=TyfAsnULfy6tjn3Ia5qUTfILGrN5Jw4CHLK+yxZJ2uxn+01QB7JcfwT6kjkYROpupGnrqm d8mgNfVnGwlZNqjyq9yl5oCIAmlnVuOVtRt+3tEQbaF0NM5YPK8QBd4n6Q5cvok4GmXrTh YLJheV9+n5YQhB7B+p/d/jY16iE6b2I= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PZlHG5nrzzSkZh; Mon, 13 Mar 2023 13:15:54 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 13 Mar 2023 13:19:06 +0800 From: Kefeng Wang To: Naoya Horiguchi , Andrew Morton , CC: Miaohe Lin , , Kefeng Wang , David Hildenbrand Subject: [PATCH v2] mm: memory-failure: directly use IS_ENABLED(CONFIG_HWPOISON_INJECT) Date: Mon, 13 Mar 2023 13:39:29 +0800 Message-ID: <20230313053929.84607-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230310133843.76883-1-wangkefeng.wang@huawei.com> References: <20230310133843.76883-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 74023120018 X-Stat-Signature: s1qtuhuz7fqurhqxd9tn6qnbxb5qxjf8 X-HE-Tag: 1678684751-183827 X-HE-Meta: U2FsdGVkX1/DNXMmqhQuDWwsjhzQDef8LO8MmA1BiiCUp7FH/TSfUln3KjUJriASsQQbpaAYIeCx/MxuS+NtYFnFQW2H5L+RWY5NyVN1J75aytb6Wx3LkPukBfNlKUmDaZgCiZtIRIcwuEGrMwvY3S45syOPeb3A+R/aWLTtufu6d5JkdHZeUE1ZmsCctoSB6D71MGa/dJwWIW7u29pg01+q0nJWJnQCfTPYWe5G108VkKLc7kp2Lx7qOidSVnHwYPSQ6aaMXjVpPbkLPHeCrH2UwW4V9eyIry/bEn8haEHc+4VBovVT3zPchhSyxmI4WHBZGF0RD6ScxydeoPH9k3jJ0UA2CXE5pNth2kNuKwoTn9I2e/L0F0dfYI+zfs06a30peK5bnI3grdPPmRV9fu/qD5wFKljGYJ4UFmBSDBjeMJEYNElBwfxxfBUHMpg66NbkAlIUxrmvpkeymhpzNAR//J0y6N0xFPK/eQqpFeBsWsHEX9LjJQ4/x+4jjV9ul/Y9LQlez3kTFnNs6cuS9uNop24FLZTwZzB5+ILejVUF0fXcQb9D5z8b6zsPuCXfsoZkK7nht+VlecVw+hEhtFwzp46Y/VkuUPH9ORwqKlaZrZNBLRgU7HVqJKNAADLtFxYOPKaxPlRntk9rudc4m7n819wth/iO+cDzYGZ3XIGhJ8c8IsdWezOsSBdpROcX2plREFqxxO2ScNpfflIf/YW7sjNkqcwkORhkRg7DUCbPjo5wBNvHmEkquvezW6VtXX4Ty8zgRziQ8eWIRHzSyictqYQxyFYqYWBzlUx00Q0qH9D2px6nbcH7jQx6sDAd2QOXAXOd078XpaNSeA6ih5a85iXMkKm3hOhHd9hkevWp43vLFpzA2ymj7LON26/ZDXZKXO/oxPiHc3yBX6LWrPxXCocqda0C1jAMDeKgkAR3BbmkSheh+d2VpEQqlKbZSu23DNqdmpi6ZPi4eYI Wb83vesp G2JIGlGtUvmKhYsDrRu6xbuFqEaeybruV/X+imY51e8ikaIlbiX2EYTJQGjn6bpvYfmmWN0vN0wBpoQdWfelRMUNhs08z06Xk/MQLJC47/NCl9Ufn/olbeQrK5csM2irot892mYnAwyKmFX07mBU7uUkkUu15GehkWzS0eM2PQaTs9mphA6YcWg6KSsyIL1C81bYcpNSL7w0WaUfSFHdk1QBTAfo9T/Rx9akA+I1QzpusLcD+mUEu/q5A/Ap0+87WhAG3 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: It's more clear and simple to just use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to enable HWPoison injector module instead of CONFIG_HWPOISON_INJECT/CONFIG_HWPOISON_INJECT_MODULE. Reviewed-by: David Hildenbrand Acked-by: Naoya Horiguchi Signed-off-by: Kefeng Wang --- v2: - add Ack/Rb, also update the suject/changelog suggested by Andrew mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index fae9baf3be16..f761704d27d7 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -168,7 +168,7 @@ static bool page_handle_poison(struct page *page, bool hugepage_or_freepage, boo return true; } -#if defined(CONFIG_HWPOISON_INJECT) || defined(CONFIG_HWPOISON_INJECT_MODULE) +#if IS_ENABLED(CONFIG_HWPOISON_INJECT) u32 hwpoison_filter_enable = 0; u32 hwpoison_filter_dev_major = ~0U;