diff options
author | Qiuxu Zhuo <qiuxu.zhuo@intel.com> | 2025-09-03 11:06:48 +0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2025-09-03 07:48:01 -0700 |
commit | 2292c8061c783e6900fcedcee388f69deab765ef (patch) | |
tree | c42398d7e819f15fe6f536624c3cf8a1b08230b0 | |
parent | 776cc2ec155cfc066087436a6afc86fe52bd5365 (diff) |
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
-rw-r--r-- | drivers/edac/skx_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c index 5899a1110495..724842f512ac 100644 --- a/drivers/edac/skx_common.c +++ b/drivers/edac/skx_common.c @@ -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; } } |