hpet: Fix the wrong format specifier
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>
Thu, 5 Sep 2024 06:51:59 +0000 (14:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Sep 2024 14:03:00 +0000 (16:03 +0200)
The unsigned int should use "%u" instead of "%d".

Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20240905065159.45774-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/hpet.c

index f6c92106eb98526c0a730bae590bedd44a346981..3dadc4accee3e0d6750585045f4c8d80c18c449f 100644 (file)
@@ -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;