linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] EDAC/skx_common: Use topology_physical_package_id() instead of open coding
@ 2025-09-03  3:06 Qiuxu Zhuo
  2025-09-03 14:52 ` Luck, Tony
  0 siblings, 1 reply; 2+ messages in thread
From: Qiuxu Zhuo @ 2025-09-03  3:06 UTC (permalink / raw)
  To: Tony Luck, Borislav Petkov
  Cc: Qiuxu Zhuo, Zhang Rui, James Morse, Mauro Carvalho Chehab,
	Robert Richter, Lai Yi, linux-edac, linux-kernel

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>
---
 drivers/edac/skx_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c
index 39c733dbc5b9..6e92f2ff5c24 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>
@@ -265,7 +266,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;
 			}
 		}

base-commit: b320789d6883cc00ac78ce83bccbfe7ed58afcf0
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH 1/1] EDAC/skx_common: Use topology_physical_package_id() instead of open coding
  2025-09-03  3:06 [PATCH 1/1] EDAC/skx_common: Use topology_physical_package_id() instead of open coding Qiuxu Zhuo
@ 2025-09-03 14:52 ` Luck, Tony
  0 siblings, 0 replies; 2+ messages in thread
From: Luck, Tony @ 2025-09-03 14:52 UTC (permalink / raw)
  To: Zhuo, Qiuxu, Borislav Petkov
  Cc: Zhang, Rui, James Morse, Mauro Carvalho Chehab, Robert Richter,
	Lai Yi, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org

> 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>

Applied. Thanks.

-Tony

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-03 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03  3:06 [PATCH 1/1] EDAC/skx_common: Use topology_physical_package_id() instead of open coding Qiuxu Zhuo
2025-09-03 14:52 ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).