[PATCH] hpet: Fix the wrong format specifier

zhangjiao2 posted 1 patch 1 year, 3 months ago
drivers/char/hpet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] hpet: Fix the wrong format specifier
Posted by zhangjiao2 1 year, 3 months ago
From: zhang jiao <zhangjiao2@cmss.chinamobile.com>

The unsigned int should use "%u" instead of "%d".

Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
---
 drivers/char/hpet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index f6c92106eb98..3dadc4accee3 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -865,11 +865,11 @@ int hpet_alloc(struct hpet_data *hdp)
 	do_div(temp, period);
 	hpetp->hp_tick_freq = temp; /* ticks per second */
 
-	printk(KERN_INFO "hpet%d: at MMIO 0x%lx, IRQ%s",
+	printk(KERN_INFO "hpet%u: at MMIO 0x%lx, IRQ%s",
 		hpetp->hp_which, hdp->hd_phys_address,
 		hpetp->hp_ntimer > 1 ? "s" : "");
 	for (i = 0; i < hpetp->hp_ntimer; i++)
-		printk(KERN_CONT "%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
+		printk(KERN_CONT "%s %u", i > 0 ? "," : "", hdp->hd_irq[i]);
 	printk(KERN_CONT "\n");
 
 	temp = hpetp->hp_tick_freq;
-- 
2.33.0