Skip to contentSkip to conversation

ARM: nomadik: fix clocksource warning

PATCH New Arnd Bergmann 3 participants 4 messages May 31, 2013 – Jun 3, 2013 Clocksource, clockevent drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: nomadik: fix clocksource warning

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.

---

I've applied this patch on top of next/dt to remove the warning introduced by Linus' patch.

drivers/clocksource/nomadik-mtu.c +1 -11
index 7982cb0..b9415b6 100644
@@ -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");
#1 lore raw

PATCH 1/1 ARM: nomadik: fix clocksource warning

Quoted 10 lines · Arnd Bergmann

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.

Quoted 6 lines

---

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

#2 lore raw

PATCH 1/1 ARM: nomadik: fix clocksource warning

Quoted 5 lines · Olof Johansson

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.

Thanks. I had applied it locally but then forgot to push it out.

Arnd

#3 lore raw

PATCH 1/1 ARM: nomadik: fix clocksource warning

In reply to Arnd Bergmann

2013/5/31 Arnd Bergmann <[email protected]>:

Quoted 11 lines

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.

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...

Yours,
Linus Walleij