* [PATCH] mm: memory-failure: correct HWPOISON_INJECT config
@ 2023-03-10 13:38 Kefeng Wang
2023-03-10 14:13 ` David Hildenbrand
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Kefeng Wang @ 2023-03-10 13:38 UTC (permalink / raw)
To: Naoya Horiguchi, Andrew Morton, linux-mm
Cc: Miaohe Lin, linux-kernel, Kefeng Wang
Use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to
enable HWPoison injector module.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
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;
--
2.35.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: memory-failure: correct HWPOISON_INJECT config
2023-03-10 13:38 [PATCH] mm: memory-failure: correct HWPOISON_INJECT config Kefeng Wang
@ 2023-03-10 14:13 ` David Hildenbrand
2023-03-12 20:50 ` Andrew Morton
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: David Hildenbrand @ 2023-03-10 14:13 UTC (permalink / raw)
To: Kefeng Wang, Naoya Horiguchi, Andrew Morton, linux-mm
Cc: Miaohe Lin, linux-kernel
On 10.03.23 14:38, Kefeng Wang wrote:
> Use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to
> enable HWPoison injector module.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> 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;
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: memory-failure: correct HWPOISON_INJECT config
2023-03-10 13:38 [PATCH] mm: memory-failure: correct HWPOISON_INJECT config Kefeng Wang
2023-03-10 14:13 ` David Hildenbrand
@ 2023-03-12 20:50 ` Andrew Morton
2023-03-13 5:10 ` Kefeng Wang
2023-03-13 4:25 ` HORIGUCHI NAOYA(堀口 直也)
2023-03-13 5:39 ` [PATCH v2] mm: memory-failure: directly use IS_ENABLED(CONFIG_HWPOISON_INJECT) Kefeng Wang
3 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2023-03-12 20:50 UTC (permalink / raw)
To: Kefeng Wang; +Cc: Naoya Horiguchi, linux-mm, Miaohe Lin, linux-kernel
On Fri, 10 Mar 2023 21:38:43 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> Use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to
> enable HWPoison injector module.
This is quite clear from the patch itself. What is unclear is "why".
Does it fix a build error? If so, please describe and add a Fixes: if
appropriate. Is it just a cleanup? etcetera.
Thanks.
> --- 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;
> --
> 2.35.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: memory-failure: correct HWPOISON_INJECT config
2023-03-10 13:38 [PATCH] mm: memory-failure: correct HWPOISON_INJECT config Kefeng Wang
2023-03-10 14:13 ` David Hildenbrand
2023-03-12 20:50 ` Andrew Morton
@ 2023-03-13 4:25 ` HORIGUCHI NAOYA(堀口 直也)
2023-03-13 5:39 ` [PATCH v2] mm: memory-failure: directly use IS_ENABLED(CONFIG_HWPOISON_INJECT) Kefeng Wang
3 siblings, 0 replies; 6+ messages in thread
From: HORIGUCHI NAOYA(堀口 直也) @ 2023-03-13 4:25 UTC (permalink / raw)
To: Kefeng Wang; +Cc: Andrew Morton, linux-mm, Miaohe Lin, linux-kernel
On Fri, Mar 10, 2023 at 09:38:43PM +0800, Kefeng Wang wrote:
> Use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to
> enable HWPoison injector module.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Hi, Kefeng,
Thanks for the patch, looks good to me, but as Andrew commented,
please add some info about the motivation in the commit log.
With the update,
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm: memory-failure: correct HWPOISON_INJECT config
2023-03-12 20:50 ` Andrew Morton
@ 2023-03-13 5:10 ` Kefeng Wang
0 siblings, 0 replies; 6+ messages in thread
From: Kefeng Wang @ 2023-03-13 5:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: Naoya Horiguchi, linux-mm, Miaohe Lin, linux-kernel
On 2023/3/13 4:50, Andrew Morton wrote:
> On Fri, 10 Mar 2023 21:38:43 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
>> Use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to
>> enable HWPoison injector module.
>
> This is quite clear from the patch itself. What is unclear is "why".
> Does it fix a build error? If so, please describe and add a Fixes: if
> appropriate. Is it just a cleanup? etcetera.
oh, it's just a cleanup, I think it is no need to use the word 'correct',
will update the subject and change log.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] mm: memory-failure: directly use IS_ENABLED(CONFIG_HWPOISON_INJECT)
2023-03-10 13:38 [PATCH] mm: memory-failure: correct HWPOISON_INJECT config Kefeng Wang
` (2 preceding siblings ...)
2023-03-13 4:25 ` HORIGUCHI NAOYA(堀口 直也)
@ 2023-03-13 5:39 ` Kefeng Wang
3 siblings, 0 replies; 6+ messages in thread
From: Kefeng Wang @ 2023-03-13 5:39 UTC (permalink / raw)
To: Naoya Horiguchi, Andrew Morton, linux-mm
Cc: Miaohe Lin, linux-kernel, Kefeng Wang, David Hildenbrand
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 <david@redhat.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
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;
--
2.35.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-13 5:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 13:38 [PATCH] mm: memory-failure: correct HWPOISON_INJECT config Kefeng Wang
2023-03-10 14:13 ` David Hildenbrand
2023-03-12 20:50 ` Andrew Morton
2023-03-13 5:10 ` Kefeng Wang
2023-03-13 4:25 ` HORIGUCHI NAOYA(堀口 直也)
2023-03-13 5:39 ` [PATCH v2] mm: memory-failure: directly use IS_ENABLED(CONFIG_HWPOISON_INJECT) Kefeng Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).