From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759020AbcHaD5C (ORCPT ); Tue, 30 Aug 2016 23:57:02 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:35907 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757562AbcHaD47 (ORCPT ); Tue, 30 Aug 2016 23:56:59 -0400 Date: Wed, 31 Aug 2016 09:26:54 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM list , Linux Kernel Mailing List Subject: Re: [PATCH] cpufreq: Drop unnecessary check from cpufreq_policy_alloc() Message-ID: <20160831035654.GD5539@vireshk-i7> References: <3010935.IpTCVVCXDt@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3010935.IpTCVVCXDt@vostro.rjw.lan> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31-08-16, 03:11, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > 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 > --- > 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