From: Qiuxu Zhuo Date: Wed, 3 Sep 2025 03:06:48 +0000 (+0800) Subject: EDAC/skx_common: Use topology_physical_package_id() instead of open coding X-Git-Tag: v6.18-rc1~194^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2292c8061c783e6900fcedcee388f69deab765ef;p=thirdparty%2Fkernel%2Fstable.git EDAC/skx_common: Use topology_physical_package_id() instead of open coding Use topology_physical_package_id() to get the CPU package ID instead of open coding. Suggested-by: Zhang Rui Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20250903030648.3285935-1-qiuxu.zhuo@intel.com --- diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c index 5899a11104955..724842f512aca 100644 --- a/drivers/edac/skx_common.c +++ b/drivers/edac/skx_common.c @@ -14,6 +14,7 @@ * Copyright (c) 2018, Intel Corporation. */ +#include #include #include #include @@ -278,7 +279,7 @@ static int skx_get_pkg_id(struct skx_dev *d, u8 *id) struct cpuinfo_x86 *c = &cpu_data(cpu); if (c->initialized && cpu_to_node(cpu) == node) { - *id = c->topo.pkg_id; + *id = topology_physical_package_id(cpu); return 0; } }