lkml.org 
[lkml]   [2018]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] base/drivers/arch_topology: Remove useless check
Date
The function 'register_cpufreq_notifier' registers the
init_cpu_capacity_notifier() only if raw_capacity is not NULL.

Hence init_cpu_capacity_notifier() can not be called with raw_capacity
set to NULL, it is pointless to check it.

Remove the check.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/base/arch_topology.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index e7cb0c6..204ed10 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -181,9 +181,6 @@ init_cpu_capacity_callback(struct notifier_block *nb,
struct cpufreq_policy *policy = data;
int cpu;

- if (!raw_capacity)
- return 0;
-
if (val != CPUFREQ_NOTIFY)
return 0;

--
2.7.4
\
 
 \ /
  Last update: 2018-10-29 17:23    [W:0.177 / U:24.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site