From 5e185ccfff2728fa351cea41f6d9fefebfb88078 Mon Sep 17 00:00:00 2001 From: Brice Goglin Date: Fri, 11 Jun 2021 16:59:20 +0200 Subject: [PATCH] rsmi: fix the XGMIPeers info attribute Only add the last one, not all the intermediate versions. Signed-off-by: Brice Goglin (cherry picked from commit 52fc3d03e4e3d9186fc63a2e21f1eb2c2ad2e7b9) --- hwloc/topology-rsmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwloc/topology-rsmi.c b/hwloc/topology-rsmi.c index 5d64665955..141b36c7ff 100644 --- a/hwloc/topology-rsmi.c +++ b/hwloc/topology-rsmi.c @@ -296,9 +296,9 @@ hwloc_rsmi_discover(struct hwloc_backend *backend, struct hwloc_disc_status *dst xgmi_bws[i*nb+j] = 100000; /* TODO: verify the XGMI version before putting 100GB/s here? */ got_xgmi_bws = 1; } - if (xgmi_peers[0] != '\0') - hwloc_obj_add_info(osdev, "XGMIPeers", xgmi_peers); } + if (xgmi_peers[0] != '\0') + hwloc_obj_add_info(osdev, "XGMIPeers", xgmi_peers); free(xgmi_peers); }