1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Description: Compatibility with newer kernels
Author: Mario Limonciello <superm1@gmail.com>
Origin: other
Forwarded: https://github.com/Xilinx/XRT/pull/9411
Last-Update: 2025-11-18
From a248a246ef0edd2a5da01d5c6e844bb133fc10e2 Mon Sep 17 00:00:00 2001
From: "Mario Limonciello (AMD)" <superm1@kernel.org>
Date: Thu, 6 Nov 2025 11:17:37 -0600
Subject: [PATCH 4/9] Fix unit type in an snprintf
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
.../core/pcie/driver/linux/xocl/subdev/feature_rom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/subdev/feature_rom.c b/src/runtime_src/core/pcie/driver/linux/xocl/subdev/feature_rom.c
index 81ddd06ed..0ac29e1e6 100644
--- a/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/subdev/feature_rom.c
+++ b/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/subdev/feature_rom.c
@@ -354,7 +354,7 @@ static void set_vbnv_name(struct platform_device *pdev)
if (idcode == 0x04261818)
return;
- snprintf(sh_version, sizeof(sh_version), "%lx", idcode);
+ snprintf(sh_version, sizeof(sh_version), "%x", idcode);
memset(rom->header.VBNVName, 0, sizeof(rom->header.VBNVName));
strncpy(rom->header.VBNVName, AWS_F2_XDMA_SHELL_NAME, strlen(AWS_F2_XDMA_SHELL_NAME));
strncpy(&rom->header.VBNVName[32], sh_version, sizeof(sh_version)-1);
--
2.43.0
|