Commit 6d15120b authored by Tony Lindgren's avatar Tony Lindgren Committed by Daniel Lezcano

clocksource/drivers/timer-ti-dm: Fix warning for set but not used

We can get a warning for dmtimer_clocksource_init() with 'pa' set but
not used. This was used in the earlier revisions of the code but no
longer needed, so let's remove the unused pa and of_translate_address().
Let's also do it for dmtimer_clockevent_init() that has a similar issue.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200519155157.12804-1-tony@atomide.com
parent aba1ad05
...@@ -514,7 +514,6 @@ static int __init dmtimer_clockevent_init(struct device_node *np) ...@@ -514,7 +514,6 @@ static int __init dmtimer_clockevent_init(struct device_node *np)
struct clock_event_device *dev; struct clock_event_device *dev;
struct dmtimer_systimer *t; struct dmtimer_systimer *t;
int error; int error;
u32 pa;
clkevt = kzalloc(sizeof(*clkevt), GFP_KERNEL); clkevt = kzalloc(sizeof(*clkevt), GFP_KERNEL);
if (!clkevt) if (!clkevt)
...@@ -563,7 +562,6 @@ static int __init dmtimer_clockevent_init(struct device_node *np) ...@@ -563,7 +562,6 @@ static int __init dmtimer_clockevent_init(struct device_node *np)
writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->irq_ena); writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->irq_ena);
writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->wakeup); writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->wakeup);
pa = of_translate_address(np, of_get_address(np, 0, NULL, NULL));
pr_info("TI gptimer clockevent: %s%lu Hz at %pOF\n", pr_info("TI gptimer clockevent: %s%lu Hz at %pOF\n",
of_find_property(np, "ti,timer-alwon", NULL) ? of_find_property(np, "ti,timer-alwon", NULL) ?
"always-on " : "", t->rate, np->parent); "always-on " : "", t->rate, np->parent);
...@@ -637,7 +635,6 @@ static int __init dmtimer_clocksource_init(struct device_node *np) ...@@ -637,7 +635,6 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
struct dmtimer_systimer *t; struct dmtimer_systimer *t;
struct clocksource *dev; struct clocksource *dev;
int error; int error;
u32 pa;
clksrc = kzalloc(sizeof(*clksrc), GFP_KERNEL); clksrc = kzalloc(sizeof(*clksrc), GFP_KERNEL);
if (!clksrc) if (!clksrc)
...@@ -666,7 +663,6 @@ static int __init dmtimer_clocksource_init(struct device_node *np) ...@@ -666,7 +663,6 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
writel_relaxed(OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, writel_relaxed(OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR,
t->base + t->ctrl); t->base + t->ctrl);
pa = of_translate_address(np, of_get_address(np, 0, NULL, NULL));
pr_info("TI gptimer clocksource: %s%pOF\n", pr_info("TI gptimer clocksource: %s%pOF\n",
of_find_property(np, "ti,timer-alwon", NULL) ? of_find_property(np, "ti,timer-alwon", NULL) ?
"always-on " : "", np->parent); "always-on " : "", np->parent);
......
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