lkml.org 
[lkml]   [2014]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 19/38] tick-common: remove local variable 'broadcast' from tick_resume()
Date
'broadcast' is used just once and we can easily use tick_resume_broadcast()
directly instead. Also it changes the code a bit to get rid of extra indentation
level which was forcing us to break function calls into two lines.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
kernel/time/tick-common.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 3954f4d..e1b2947 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -351,17 +351,16 @@ void tick_resume(void)
{
struct tick_device *td = tick_get_cpu_device();
struct clock_event_device *dev = td->evtdev;
- int broadcast = tick_resume_broadcast();

clockevents_set_mode(dev, CLOCK_EVT_MODE_RESUME);

- if (!broadcast) {
- if (td->mode == TICKDEV_MODE_PERIODIC)
- tick_setup_periodic(dev, 0);
- else
- tick_setup_oneshot(dev, dev->event_handler,
- ktime_get());
- }
+ if (tick_resume_broadcast())
+ return;
+
+ if (td->mode == TICKDEV_MODE_PERIODIC)
+ tick_setup_periodic(dev, 0);
+ else
+ tick_setup_oneshot(dev, dev->event_handler, ktime_get());
}

/**
--
1.7.12.rc2.18.g61b472e


\
 
 \ /
  Last update: 2014-04-14 23:41    [W:0.107 / U:10.172 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site