Re: [PATCH v1 1/1] cxl/mem: Do not return error if CONFIG_CXL_MCE unset

From: Ira Weiny
Date: Thu Feb 27 2025 - 11:05:11 EST


Li Ming wrote:
> CONFIG_CXL_MCE depends on CONFIG_MEMORY_FAILURE, if
> CONFIG_CXL_MCE is not set, devm_cxl_register_mce_notifier() will return
> an -EOPNOTSUPP, it will cause cxl_mem_state_create() failure , and then
> cxl pci device probing failed. In this case, it should not break cxl pci
> device probing.
>
> Add a checking in cxl_mem_state_create() to check if the returned value
> of devm_cxl_register_mce_notifier() is -EOPNOTSUPP, if yes, just output
> a warning log, do not let cxl_mem_state_create() return an error.
>
> Signed-off-by: Li Ming <ming.li@xxxxxxxxxxxx>

Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>

[snip]