From: Florian Fainelli <f.fainelli@gmail.com>
To: Olof Johansson <olof@lixom.net>,
daniel.lezcano@linaro.org, tglx@linutronix.de
Cc: bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clocksource: kona: fix __iomem annotation
Date: Mon, 08 Dec 2014 14:37:35 -0800 [thread overview]
Message-ID: <5486282F.3040909@gmail.com> (raw)
In-Reply-To: <1418074922-671-1-git-send-email-olof@lixom.net>
On 08/12/14 13:42, Olof Johansson wrote:
> 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>
> ---
> drivers/clocksource/bcm_kona_timer.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c
> index 0595dc6..f1e33d0 100644
> --- a/drivers/clocksource/bcm_kona_timer.c
> +++ b/drivers/clocksource/bcm_kona_timer.c
> @@ -68,9 +68,8 @@ static void kona_timer_disable_and_clear(void __iomem *base)
> }
>
> static void
> -kona_timer_get_counter(void *timer_base, uint32_t *msw, uint32_t *lsw)
> +kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw)
> {
> - void __iomem *base = IOMEM(timer_base);
> int loop_limit = 4;
>
> /*
> @@ -86,9 +85,9 @@ kona_timer_get_counter(void *timer_base, uint32_t *msw, uint32_t *lsw)
> */
>
> while (--loop_limit) {
> - *msw = readl(base + KONA_GPTIMER_STCHI_OFFSET);
> - *lsw = readl(base + KONA_GPTIMER_STCLO_OFFSET);
> - if (*msw == readl(base + KONA_GPTIMER_STCHI_OFFSET))
> + *msw = readl(timer_base + KONA_GPTIMER_STCHI_OFFSET);
> + *lsw = readl(timer_base + KONA_GPTIMER_STCLO_OFFSET);
> + if (*msw == readl(timer_base + KONA_GPTIMER_STCHI_OFFSET))
> break;
> }
> if (!loop_limit) {
>
prev parent reply other threads:[~2014-12-08 22:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 21:42 Olof Johansson
2014-12-08 22:37 ` Florian Fainelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5486282F.3040909@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®