From patchwork Fri Jan 2 07:04:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42688 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 28B9A26CD1 for ; Fri, 2 Jan 2015 07:06:01 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id k14sf2820577wgh.6 for ; Thu, 01 Jan 2015 23:06:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=CtL4dUZEXAuHwhRkI5KKfOaR+sYgXpMXiVX7QM9C5J8=; b=LTBYJmrAOSyn/kcdvc1uqaHBQV7EWt3sSFzIKtTrcxPGshBwgDhhzYPF6fEbHt5e7P NKZISGUSh1G1ko4J+ACy56RrJCAoUDfO1LP65WEkRTZ52nbCxU5hbyUOZq7tJC8pTEvg s4Xp/kXjhrVCrbYm6kn5KBohv59dL+59els0HFg0zHbpSS8MThoCYbnVWtyKbcIgR1XR whtCI4z4AcpZUjv34VOzGiWQL+/6FgLRf09CLQ4a8MIo/fstnEUsrSQ/bnIZOc5L+ACF IiJkKz8BTQ3lzI7MYvemcy2ZyIFMwWDtinj+l+Q+rdQL66VZtcgd21Ug1qM4WdjT6Zmj SXIQ== X-Gm-Message-State: ALoCoQnWtwUJNqCrchc/Il9qm5qj8j4cLLuGktEzM7cX1Tvwk0ff8I6tVvQxemMsqfcE25rAxYY0 X-Received: by 10.112.148.198 with SMTP id tu6mr6330077lbb.3.1420182360392; Thu, 01 Jan 2015 23:06:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.229 with SMTP id e5ls1425496laa.105.gmail; Thu, 01 Jan 2015 23:06:00 -0800 (PST) X-Received: by 10.112.168.164 with SMTP id zx4mr74966416lbb.28.1420182360032; Thu, 01 Jan 2015 23:06:00 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id lk10si38514655lac.5.2015.01.01.23.06.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:06:00 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so14787711lab.20 for ; Thu, 01 Jan 2015 23:05:59 -0800 (PST) X-Received: by 10.152.26.201 with SMTP id n9mr75607305lag.50.1420182359943; Thu, 01 Jan 2015 23:05:59 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp126250lbb; Thu, 1 Jan 2015 23:05:59 -0800 (PST) X-Received: by 10.68.193.135 with SMTP id ho7mr21652356pbc.103.1420182358765; Thu, 01 Jan 2015 23:05:58 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dl1si29047854pbb.67.2015.01.01.23.05.56; Thu, 01 Jan 2015 23:05:58 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750768AbbABHF4 (ORCPT + 12 others); Fri, 2 Jan 2015 02:05:56 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:47805 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbbABHF4 (ORCPT ); Fri, 2 Jan 2015 02:05:56 -0500 Received: by mail-pa0-f44.google.com with SMTP id et14so23671889pad.17 for ; Thu, 01 Jan 2015 23:05:55 -0800 (PST) X-Received: by 10.70.140.229 with SMTP id rj5mr119612513pdb.60.1420182355554; Thu, 01 Jan 2015 23:05:55 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id w5sm45672070pdj.13.2015.01.01.23.05.54 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:54 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH 16/17] cpufreq: remove check for cpufreq_disabled() from cpufreq_cpu_{get|put}() Date: Fri, 2 Jan 2015 12:34:37 +0530 Message-Id: <49250a2946ff12500a5474eb9384c125b3ede23c.1420181916.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.2.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In most of the cases cpufreq wouldn't be disabled and this adds unnecessary delay for its users. In the case if cpufreq is really disabled, then the per-cpu variable will also return NULL and things will continue working as is. Remove this unnecessary check. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 14d637a28dd8..62c6a0b8b0d1 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -202,9 +202,6 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) struct cpufreq_policy *policy = NULL; unsigned long flags; - if (cpufreq_disabled()) - return NULL; - if (!down_read_trylock(&cpufreq_rwsem)) return NULL; @@ -229,9 +226,6 @@ EXPORT_SYMBOL_GPL(cpufreq_cpu_get); void cpufreq_cpu_put(struct cpufreq_policy *policy) { - if (cpufreq_disabled()) - return; - kobject_put(&policy->kobj); up_read(&cpufreq_rwsem); }