Commit 09e15176 authored by Dan Carpenter's avatar Dan Carpenter Committed by Daniel Lezcano

clocksource: exynos_mct: silence a static checker warning

My guess is we aren't going to have a 2 digit cpuid here any time soon
but the static checkers don't know that and complain that the snprintf()
could overflow.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent cd325295
...@@ -410,7 +410,7 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt) ...@@ -410,7 +410,7 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
mevt = container_of(evt, struct mct_clock_event_device, evt); mevt = container_of(evt, struct mct_clock_event_device, evt);
mevt->base = EXYNOS4_MCT_L_BASE(cpu); mevt->base = EXYNOS4_MCT_L_BASE(cpu);
sprintf(mevt->name, "mct_tick%d", cpu); snprintf(mevt->name, sizeof(mevt->name), "mct_tick%d", cpu);
evt->name = mevt->name; evt->name = mevt->name;
evt->cpumask = cpumask_of(cpu); evt->cpumask = cpumask_of(cpu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment