[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <c20bfe318b69821078bcd8d0d55126dc6b6f0d26.1397492345.git.viresh.kumar@linaro.org>
Date: Mon, 14 Apr 2014 21:53:58 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: tglx@...utronix.de
Cc: linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
fweisbec@...il.com, Arvind.Chauhan@....com,
linaro-networking@...aro.org,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: [PATCH 36/38] tick-broadcast: get rid of extra comparison in tick_do_broadcast_on_off()
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.kumar@...aro.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists