[PATCH] tools/x86/kcpuid: Fix the wrong format specifier

Luo Yifan posted 1 patch 2 weeks, 5 days ago
tools/arch/x86/kcpuid/kcpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tools/x86/kcpuid: Fix the wrong format specifier
Posted by Luo Yifan 2 weeks, 5 days ago
Use '%u' instead of '%d' for unsigned int.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
---
 tools/arch/x86/kcpuid/kcpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/arch/x86/kcpuid/kcpuid.c b/tools/arch/x86/kcpuid/kcpuid.c
index 1b25c0a95..b94071ec0 100644
--- a/tools/arch/x86/kcpuid/kcpuid.c
+++ b/tools/arch/x86/kcpuid/kcpuid.c
@@ -117,7 +117,7 @@ static void leaf_print_raw(struct subleaf *leaf)
 		if (leaf->sub == 0)
 			printf("0x%08x: subleafs:\n", leaf->index);
 
-		printf(" %2d: EAX=0x%08x, EBX=0x%08x, ECX=0x%08x, EDX=0x%08x\n",
+		printf(" %2u: EAX=0x%08x, EBX=0x%08x, ECX=0x%08x, EDX=0x%08x\n",
 			leaf->sub, leaf->eax, leaf->ebx, leaf->ecx, leaf->edx);
 	} else {
 		printf("0x%08x: EAX=0x%08x, EBX=0x%08x, ECX=0x%08x, EDX=0x%08x\n",
-- 
2.27.0