* [PATCH] MIPS: Fix the wrong format specifier
@ 2024-12-04 9:23 liujing
2025-01-11 12:03 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: liujing @ 2024-12-04 9:23 UTC (permalink / raw)
To: tsbogend; +Cc: linux-mips, linux-kernel, liujing
Make a minor change to eliminate a static checker warning. The type
of cpu 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/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
index d39a2963b451..2a14dc4ee57e 100644
--- a/arch/mips/kernel/cevt-bcm1480.c
+++ b/arch/mips/kernel/cevt-bcm1480.c
@@ -103,7 +103,7 @@ void sb1480_clockevent_init(void)
BUG_ON(cpu > 3); /* Only have 4 general purpose timers */
- sprintf(name, "bcm1480-counter-%d", cpu);
+ sprintf(name, "bcm1480-counter-%u", cpu);
cd->name = name;
cd->features = CLOCK_EVT_FEAT_PERIODIC |
CLOCK_EVT_FEAT_ONESHOT;
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: Fix the wrong format specifier
2024-12-04 9:23 [PATCH] MIPS: Fix the wrong format specifier liujing
@ 2025-01-11 12:03 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2025-01-11 12:03 UTC (permalink / raw)
To: liujing; +Cc: linux-mips, linux-kernel
On Wed, Dec 04, 2024 at 05:23:38PM +0800, liujing wrote:
> Make a minor change to eliminate a static checker warning. The type
> of cpu 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/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
> index d39a2963b451..2a14dc4ee57e 100644
> --- a/arch/mips/kernel/cevt-bcm1480.c
> +++ b/arch/mips/kernel/cevt-bcm1480.c
> @@ -103,7 +103,7 @@ void sb1480_clockevent_init(void)
>
> BUG_ON(cpu > 3); /* Only have 4 general purpose timers */
>
> - sprintf(name, "bcm1480-counter-%d", cpu);
> + sprintf(name, "bcm1480-counter-%u", cpu);
> cd->name = name;
> cd->features = CLOCK_EVT_FEAT_PERIODIC |
> CLOCK_EVT_FEAT_ONESHOT;
> --
> 2.27.0
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-11 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-04 9:23 [PATCH] MIPS: Fix the wrong format specifier liujing
2025-01-11 12:03 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®