public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/x86: Fix the wrong format specifier
@ 2024-12-04 14:33 liujing
  2024-12-04 21:22 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: liujing @ 2024-12-04 14:33 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, x86, hpa, mat.jonczyk, rdunlap
  Cc: bhelgaas, mario.limonciello, linux-kernel, liujing

Make a minor change to eliminate a static checker warning. The type
of 'i' is unsigned int, so the correct format specifier should be
%u instead of %d.

Signed-off-by: liujing <liujing@cmss.chinamobile.com>

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index c96ae8fee95e..d2cc52530f7f 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -728,7 +728,7 @@ static void __init hpet_select_clockevents(void)
 		if (!(hc->boot_cfg & HPET_TN_FSB_CAP))
 			continue;
 
-		sprintf(hc->name, "hpet%d", i);
+		sprintf(hc->name, "hpet%u", i);
 
 		irq = hpet_assign_irq(hpet_domain, hc, hc->num);
 		if (irq <= 0)
-- 
2.27.0




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

end of thread, other threads:[~2024-12-04 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 14:33 [PATCH] arch/x86: Fix the wrong format specifier liujing
2024-12-04 21:22 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox