Skip to content

Commit 6d15120

Browse files
tmlinddlezcano
authored andcommitted
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: kbuild test robot <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent aba1ad0 commit 6d15120

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/clocksource/timer-ti-dm-systimer.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ static int __init dmtimer_clockevent_init(struct device_node *np)
514514
struct clock_event_device *dev;
515515
struct dmtimer_systimer *t;
516516
int error;
517-
u32 pa;
518517

519518
clkevt = kzalloc(sizeof(*clkevt), GFP_KERNEL);
520519
if (!clkevt)
@@ -563,7 +562,6 @@ static int __init dmtimer_clockevent_init(struct device_node *np)
563562
writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->irq_ena);
564563
writel_relaxed(OMAP_TIMER_INT_OVERFLOW, t->base + t->wakeup);
565564

566-
pa = of_translate_address(np, of_get_address(np, 0, NULL, NULL));
567565
pr_info("TI gptimer clockevent: %s%lu Hz at %pOF\n",
568566
of_find_property(np, "ti,timer-alwon", NULL) ?
569567
"always-on " : "", t->rate, np->parent);
@@ -637,7 +635,6 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
637635
struct dmtimer_systimer *t;
638636
struct clocksource *dev;
639637
int error;
640-
u32 pa;
641638

642639
clksrc = kzalloc(sizeof(*clksrc), GFP_KERNEL);
643640
if (!clksrc)
@@ -666,7 +663,6 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
666663
writel_relaxed(OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR,
667664
t->base + t->ctrl);
668665

669-
pa = of_translate_address(np, of_get_address(np, 0, NULL, NULL));
670666
pr_info("TI gptimer clocksource: %s%pOF\n",
671667
of_find_property(np, "ti,timer-alwon", NULL) ?
672668
"always-on " : "", np->parent);

0 commit comments

Comments
 (0)