RE: [PATCH] EDAC, i10nm: make skx_common.o a separate module
From: Luck, Tony
Date: Wed May 29 2024 - 12:15:05 EST
> Linking an object file into multiple modules causes a warning:
>
> scripts/Makefile.build:236: drivers/edac/Makefile: skx_common.o is added to multiple modules: i10nm_edac skx_edac
In this case there is no practical problem from this double link. The two modules created: skx_edac.ko and i10nm_edac.ko
are mutually exclusive. A system may load neither, either, but not both (enforced by the x86_match_cpu() check in each
modules init function).
> Make this a separate module instead.
> +EXPORT_SYMBOL_GPL(skx_adxl_get);
> +EXPORT_SYMBOL_GPL(skx_adxl_put);
> +EXPORT_SYMBOL_GPL(skx_set_mem_cfg);
> +EXPORT_SYMBOL_GPL(skx_set_decode);
> +EXPORT_SYMBOL_GPL(skx_get_src_id);
> +EXPORT_SYMBOL_GPL(skx_get_node_id);
> +EXPORT_SYMBOL_GPL(skx_get_all_bus_mappings);
> +EXPORT_SYMBOL_GPL(skx_get_hi_lo);
> +EXPORT_SYMBOL_GPL(skx_get_dimm_info);
> +EXPORT_SYMBOL_GPL(skx_get_nvdimm_info);
> +EXPORT_SYMBOL_GPL(skx_register_mci);
> +EXPORT_SYMBOL_GPL(skx_mce_check_error);
> +EXPORT_SYMBOL_GPL(skx_remove);
With all these new EXPORTs ... perhaps drivers/edac should start
using a local export name space?
-DDEFAULT_SYMBOL_NAMESPACE=EDAC ?
But maybe a better fix might be to somehow tag skx_common.o to tell the
checker script "It's OK. I meant to do that."
-Tony