diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2023-03-13 13:39:29 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-03-28 16:20:17 -0700 |
commit | 611b9fd80fb53e79079744fb29d8c1363f4b5c02 (patch) | |
tree | 7fa2498475c7a3204a8017d5c2401ea92774865c /mm | |
parent | cf2e309ebca7bb0916771839f9b580b06c778530 (diff) | |
download | lwn-611b9fd80fb53e79079744fb29d8c1363f4b5c02.tar.gz lwn-611b9fd80fb53e79079744fb29d8c1363f4b5c02.zip |
mm: memory-failure: directly use IS_ENABLED(CONFIG_HWPOISON_INJECT)
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.
Link: https://lkml.kernel.org/r/20230313053929.84607-1-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory-failure.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |