diff mbox

cpufreq: create link to policy only for registered CPUs

Message ID 20160909113459.GG18547@vireshk-i7
State New
Headers show

Commit Message

Viresh Kumar Sept. 9, 2016, 11:34 a.m. UTC
On 09-09-16, 12:28, Russell King - ARM Linux wrote:
> On Fri, Sep 09, 2016 at 04:52:04PM +0530, Viresh Kumar wrote:

> > Thanks for testing it.. You need another patch from Rafael, which

> > should be in linux-next by now..

> > 

> > commit 3689ad7ed6a8 ("cpufreq: Drop unnecessary check from

> > cpufreq_policy_alloc()")

> > 

> > Both patches combined will fix the problem you were getting.

> 

> Please send me this other patch.  Seems absurd to fix a reported problem

> without copying appropriate patches to the reporter...


It got merged separately, and yes you should have been cc'd for that
as well.

Please find it attached now..

-- 
viresh
diff mbox

Patch

From 3689ad7ed6a836c4eec5e7bdd17a11a79591bef9 Mon Sep 17 00:00:00 2001
Message-Id: <3689ad7ed6a836c4eec5e7bdd17a11a79591bef9.1473420826.git.viresh.kumar@linaro.org>
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Date: Wed, 31 Aug 2016 03:11:31 +0200
Subject: [PATCH] cpufreq: Drop unnecessary check from cpufreq_policy_alloc()

Since cpufreq_policy_alloc() doesn't use its dev variable for
anything useful, drop that variable from there along with the
NULL check against it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 3dd4884c6f9e..13fb589b6d2c 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1073,13 +1073,9 @@  static void handle_update(struct work_struct *work)
 
 static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
 {
-	struct device *dev = get_cpu_device(cpu);
 	struct cpufreq_policy *policy;
 	int ret;
 
-	if (WARN_ON(!dev))
-		return NULL;
-
 	policy = kzalloc(sizeof(*policy), GFP_KERNEL);
 	if (!policy)
 		return NULL;
-- 
2.7.1.410.g6faf27b