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 10/38] tick-common: remove extra checks from tick_check_new_device()
Date
tick_check_new_device() is calling tick_check_percpu() which has this as the
first test:

if (!cpumask_test_cpu(cpu, newdev->cpumask))
return false;

And so the same isn't required to be repeated by tick_check_new_device(). Remove
it.

This also initializes several variables during their definition only.

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

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 949f3d3..395cbbd 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -269,16 +269,9 @@ bool tick_check_replacement(struct clock_event_device *curdev,
*/
void tick_check_new_device(struct clock_event_device *newdev)
{
- struct clock_event_device *curdev;
- struct tick_device *td;
- int cpu;
-
- cpu = smp_processor_id();
- if (!cpumask_test_cpu(cpu, newdev->cpumask))
- goto out_bc;
-
- td = tick_get_device(cpu);
- curdev = td->evtdev;
+ int cpu = smp_processor_id();
+ struct tick_device *td = tick_get_device(cpu);
+ struct clock_event_device *curdev = td->evtdev;

/* cpu local device ? */
if (!tick_check_percpu(curdev, newdev, cpu))
--
1.7.12.rc2.18.g61b472e


\
 
 \ /
  Last update: 2014-04-17 11:21    [W:0.125 / U:7.896 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site