* [PATCH] cpufreq: Drop unnecessary check from cpufreq_policy_alloc()
@ 2016-08-31 1:11 Rafael J. Wysocki
2016-08-31 3:56 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-08-31 1:11 UTC (permalink / raw)
To: Linux PM list; +Cc: Linux Kernel Mailing List, Viresh Kumar
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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>
---
drivers/cpufreq/cpufreq.c | 4 ----
1 file changed, 4 deletions(-)
Index: linux-pm/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq.c
+++ linux-pm/drivers/cpufreq/cpufreq.c
@@ -1073,13 +1073,9 @@ static void handle_update(struct work_st
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq: Drop unnecessary check from cpufreq_policy_alloc()
2016-08-31 1:11 [PATCH] cpufreq: Drop unnecessary check from cpufreq_policy_alloc() Rafael J. Wysocki
@ 2016-08-31 3:56 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2016-08-31 3:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux PM list, Linux Kernel Mailing List
On 31-08-16, 03:11, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> 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>
> ---
> drivers/cpufreq/cpufreq.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq.c
> +++ linux-pm/drivers/cpufreq/cpufreq.c
> @@ -1073,13 +1073,9 @@ static void handle_update(struct work_st
>
> 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;
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-31 3:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-31 1:11 [PATCH] cpufreq: Drop unnecessary check from cpufreq_policy_alloc() Rafael J. Wysocki
2016-08-31 3:56 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).