Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clocksource: kona: fix __iomem annotation

It makes no sense to hide the __iomem annotation from the function
that uses it, especially since it causes a sparse warning:

drivers/clocksource/bcm_kona_timer.c:118:38: warning: incorrect type in argument 1 (different address spaces)
drivers/clocksource/bcm_kona_timer.c:118:38: expected void *timer_base
drivers/clocksource/bcm_kona_timer.c:118:38: got void [noderef] <asn:2>*static [toplevel] tmr_regs

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

authored by

Olof Johansson and committed by
Daniel Lezcano
ff4bcc84 8c38d28b

+4 -5
+4 -5
drivers/clocksource/bcm_kona_timer.c
··· 68 68 } 69 69 70 70 static void 71 - kona_timer_get_counter(void *timer_base, uint32_t *msw, uint32_t *lsw) 71 + kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw) 72 72 { 73 - void __iomem *base = IOMEM(timer_base); 74 73 int loop_limit = 4; 75 74 76 75 /* ··· 85 86 */ 86 87 87 88 while (--loop_limit) { 88 - *msw = readl(base + KONA_GPTIMER_STCHI_OFFSET); 89 - *lsw = readl(base + KONA_GPTIMER_STCLO_OFFSET); 90 - if (*msw == readl(base + KONA_GPTIMER_STCHI_OFFSET)) 89 + *msw = readl(timer_base + KONA_GPTIMER_STCHI_OFFSET); 90 + *lsw = readl(timer_base + KONA_GPTIMER_STCLO_OFFSET); 91 + if (*msw == readl(timer_base + KONA_GPTIMER_STCHI_OFFSET)) 91 92 break; 92 93 } 93 94 if (!loop_limit) {