We are doing an extra comparison in tick_do_broadcast_on_off():

               if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
                       tick_broadcast_force = 1;

Whereas it can be handled easily in the switch block only.

It doesn't look like there is any strict ordering of instructions required here
and so move setting 'tick_broadcast_force' at the beginning.

Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org>
---
 kernel/time/tick-broadcast.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 3b07569..ec86227 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -348,15 +348,14 @@ static void tick_do_broadcast_on_off(unsigned long 
*reason)
        bc_stopped = cpumask_empty(tick_broadcast_mask);
 
        switch (*reason) {
-       case CLOCK_EVT_NOTIFY_BROADCAST_ON:
        case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
+               tick_broadcast_force = 1;
+       case CLOCK_EVT_NOTIFY_BROADCAST_ON:
                cpumask_set_cpu(cpu, tick_broadcast_on);
                if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) {
                        if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
                                clockevents_shutdown(dev);
                }
-               if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
-                       tick_broadcast_force = 1;
                break;
        case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
                if (tick_broadcast_force)
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to