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 <rui.zhang@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20250903030648.3285935-1-qiuxu.zhuo@intel.com
This commit is contained in:
Qiuxu Zhuo
2025-09-03 11:06:48 +08:00
committed by Tony Luck
parent 776cc2ec15
commit 2292c8061c

View File

@@ -14,6 +14,7 @@
* Copyright (c) 2018, Intel Corporation.
*/
#include <linux/topology.h>
#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/adxl.h>
@@ -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;
}
}