Commit d5fd43c4ae04523e1dcd7794f9c511b289851350
Committed by
Ingo Molnar
1 parent
8bdec955b0
Exists in
master
and in
4 other branches
hrtimer: fix HOTPLUG_CPU=n compile warning
Impact: cleanup kernel/hrtimer.c: In function 'hrtimer_cpu_notify': kernel/hrtimer.c:1574: warning: unused variable 'dcpu' Introduced by commit 37810659ea7d9572c5ac284ade272f806ef8f788 ("hrtimer: removing all ur callback modes, fix hotplug") from the timers. dcpu is only used if CONFIG_HOTPLUG_CPU is set. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 1 changed file with 8 additions and 11 deletions Side-by-side Diff
kernel/hrtimer.c
... | ... | @@ -1504,6 +1504,11 @@ |
1504 | 1504 | |
1505 | 1505 | #ifdef CONFIG_HOTPLUG_CPU |
1506 | 1506 | |
1507 | +static void tickle_timers(void *arg) | |
1508 | +{ | |
1509 | + hrtimer_peek_ahead_timers(); | |
1510 | +} | |
1511 | + | |
1507 | 1512 | static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base, |
1508 | 1513 | struct hrtimer_clock_base *new_base) |
1509 | 1514 | { |
... | ... | @@ -1539,7 +1544,7 @@ |
1539 | 1544 | } |
1540 | 1545 | } |
1541 | 1546 | |
1542 | -static int migrate_hrtimers(int scpu) | |
1547 | +static void migrate_hrtimers(int scpu) | |
1543 | 1548 | { |
1544 | 1549 | struct hrtimer_cpu_base *old_base, *new_base; |
1545 | 1550 | int dcpu, i; |
1546 | 1551 | |
... | ... | @@ -1567,14 +1572,9 @@ |
1567 | 1572 | spin_unlock_irq(&new_base->lock); |
1568 | 1573 | put_cpu_var(hrtimer_bases); |
1569 | 1574 | |
1570 | - return dcpu; | |
1575 | + smp_call_function_single(dcpu, tickle_timers, NULL, 0); | |
1571 | 1576 | } |
1572 | 1577 | |
1573 | -static void tickle_timers(void *arg) | |
1574 | -{ | |
1575 | - hrtimer_peek_ahead_timers(); | |
1576 | -} | |
1577 | - | |
1578 | 1578 | #endif /* CONFIG_HOTPLUG_CPU */ |
1579 | 1579 | |
1580 | 1580 | static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self, |
1581 | 1581 | |
... | ... | @@ -1593,11 +1593,8 @@ |
1593 | 1593 | case CPU_DEAD: |
1594 | 1594 | case CPU_DEAD_FROZEN: |
1595 | 1595 | { |
1596 | - int dcpu; | |
1597 | - | |
1598 | 1596 | clockevents_notify(CLOCK_EVT_NOTIFY_CPU_DEAD, &scpu); |
1599 | - dcpu = migrate_hrtimers(scpu); | |
1600 | - smp_call_function_single(dcpu, tickle_timers, NULL, 0); | |
1597 | + migrate_hrtimers(scpu); | |
1601 | 1598 | break; |
1602 | 1599 | } |
1603 | 1600 | #endif |