* [PATCH] ARM: nomadik: fix clocksource warning
@ 2013-05-31 15:49 Arnd Bergmann
2013-06-01 6:47 ` Olof Johansson
2013-06-02 19:23 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2013-05-31 15:49 UTC (permalink / raw)
To: linux-arm-kernel
The clocksource API has changed slightly, which causes a harmless
warning:
/git/arm-soc/drivers/clocksource/nomadik-mtu.c:259:28: warning: 'nmdk_timer_match' defined but not used [-Wunused-variable]
static struct of_device_id nmdk_timer_match[] __initconst = {
^
Fortunately, the same API change also lets us simplify the code
while removing the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I've applied this patch on top of next/dt to remove the warning introduced
by Linus' patch.
diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
index 7982cb0..b9415b6 100644
--- a/drivers/clocksource/nomadik-mtu.c
+++ b/drivers/clocksource/nomadik-mtu.c
@@ -256,23 +256,13 @@ void __init nmdk_timer_init(void __iomem *base, int irq)
__nmdk_timer_init(base, irq, pclk0, clk0);
}
-static struct of_device_id nmdk_timer_match[] __initconst = {
- { .compatible = "st,nomadik-mtu" },
- {}
-};
-
-static void __init nmdk_timer_of_init(void)
+static void __init nmdk_timer_of_init(struct device_node *node)
{
- struct device_node *node;
struct clk *pclk;
struct clk *clk;
void __iomem *base;
int irq;
- node = of_find_matching_node(NULL, nmdk_timer_match);
- if (!node)
- panic("No timer node");
-
base = of_iomap(node, 0);
if (!base)
panic("Can't remap registers");
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] ARM: nomadik: fix clocksource warning
2013-05-31 15:49 [PATCH] ARM: nomadik: fix clocksource warning Arnd Bergmann
@ 2013-06-01 6:47 ` Olof Johansson
2013-06-03 18:55 ` Arnd Bergmann
2013-06-02 19:23 ` Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2013-06-01 6:47 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, May 31, 2013 at 05:49:28PM +0200, Arnd Bergmann wrote:
> The clocksource API has changed slightly, which causes a harmless
> warning:
>
> /git/arm-soc/drivers/clocksource/nomadik-mtu.c:259:28: warning: 'nmdk_timer_match' defined but not used [-Wunused-variable]
> static struct of_device_id nmdk_timer_match[] __initconst = {
> ^
>
> Fortunately, the same API change also lets us simplify the code
> while removing the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> ---
>
> I've applied this patch on top of next/dt to remove the warning introduced
> by Linus' patch.
I didn't see that make it to the repo though?
Since you'd have to rebase anyway, I'll just apply it here and will
include it with the other branch updates.
-Olof
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] ARM: nomadik: fix clocksource warning
2013-05-31 15:49 [PATCH] ARM: nomadik: fix clocksource warning Arnd Bergmann
2013-06-01 6:47 ` Olof Johansson
@ 2013-06-02 19:23 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-06-02 19:23 UTC (permalink / raw)
To: linux-arm-kernel
2013/5/31 Arnd Bergmann <arnd@arndb.de>:
> The clocksource API has changed slightly, which causes a harmless
> warning:
>
> /git/arm-soc/drivers/clocksource/nomadik-mtu.c:259:28: warning: 'nmdk_timer_match' defined but not used [-Wunused-variable]
> static struct of_device_id nmdk_timer_match[] __initconst = {
> ^
>
> Fortunately, the same API change also lets us simplify the code
> while removing the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Ah so it matches the string directly in CLOCKSOURCE_OF_DECLARE()
OK makes perfect sense, sometimes it's hard to keep up with
the evolutional pace here...
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-03 18:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-31 15:49 [PATCH] ARM: nomadik: fix clocksource warning Arnd Bergmann
2013-06-01 6:47 ` Olof Johansson
2013-06-03 18:55 ` Arnd Bergmann
2013-06-02 19:23 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox