Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Qiuxu Zhuo and committed by
Tony Luck
2292c806 776cc2ec

+2 -1
+2 -1
drivers/edac/skx_common.c
··· 14 14 * Copyright (c) 2018, Intel Corporation. 15 15 */ 16 16 17 + #include <linux/topology.h> 17 18 #include <linux/acpi.h> 18 19 #include <linux/dmi.h> 19 20 #include <linux/adxl.h> ··· 279 278 struct cpuinfo_x86 *c = &cpu_data(cpu); 280 279 281 280 if (c->initialized && cpu_to_node(cpu) == node) { 282 - *id = c->topo.pkg_id; 281 + *id = topology_physical_package_id(cpu); 283 282 return 0; 284 283 } 285 284 }