From patchwork Tue Jan 27 08:36:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 43817 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2FCDB2409D for ; Tue, 27 Jan 2015 08:36:59 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id l61sf6812499wev.0 for ; Tue, 27 Jan 2015 00:36:58 -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=dSIAnPn+5hYtatMH9V4DoaLwHxcICV0HaFPp6t4GwN8=; b=OT7ofyPRnRJFN5kpOhMi7+rERx3xp28f07YyZcleSmzY7SjZtasmGqjELPiNYlnJEy L+zESW8labBJ3LYL6wAsYPFmEqOYN92/RVkp+4Aed0eH6Cnp7VDyVy9zJIkxE9YF11Xd YabNj5EcUlcnjwtJUjjH+J77YsW37nnvpFaCernaOaSu9s9HMfLLmkU0uQga1RTyVrcb 0j8tcFpIfsXewWXhMEgGtOOEJw3P2N6UHseF56lZkumD7RaWIcyiQfSqCvQ8U7NiHOoy xsK8YDwiPZa/9vTKXNv2qsXhDTtRtqZT0NzbwrtdPvmIBI/W0cSRnBcYk5HtTVkKlH7N uxDg== X-Gm-Message-State: ALoCoQkcdqkUuJ4NoNtm+8lQRGW0RBUk1kgkQjr2Sr2QMuEDHLDZHHle8CnEh9oUJGF2yL/cgVgA X-Received: by 10.194.204.201 with SMTP id la9mr30231wjc.6.1422347818479; Tue, 27 Jan 2015 00:36:58 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.67 with SMTP id g3ls5851lab.25.gmail; Tue, 27 Jan 2015 00:36:58 -0800 (PST) X-Received: by 10.112.8.41 with SMTP id o9mr182902lba.40.1422347818316; Tue, 27 Jan 2015 00:36:58 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id es2si501577lbb.114.2015.01.27.00.36.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Jan 2015 00:36:57 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id q1so12046820lam.2 for ; Tue, 27 Jan 2015 00:36:57 -0800 (PST) X-Received: by 10.112.170.36 with SMTP id aj4mr117470lbc.3.1422347817915; Tue, 27 Jan 2015 00:36:57 -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.35.133 with SMTP id h5csp1025412lbj; Tue, 27 Jan 2015 00:36:56 -0800 (PST) X-Received: by 10.66.186.208 with SMTP id fm16mr225944pac.62.1422347815453; Tue, 27 Jan 2015 00:36:55 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vr2si685254pbc.134.2015.01.27.00.36.54; Tue, 27 Jan 2015 00:36:55 -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 S1757807AbbA0Igr (ORCPT + 11 others); Tue, 27 Jan 2015 03:36:47 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:39364 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754034AbbA0Igp (ORCPT ); Tue, 27 Jan 2015 03:36:45 -0500 Received: by mail-pd0-f181.google.com with SMTP id g10so17527726pdj.12 for ; Tue, 27 Jan 2015 00:36:45 -0800 (PST) X-Received: by 10.70.15.196 with SMTP id z4mr292187pdc.20.1422347805199; Tue, 27 Jan 2015 00:36:45 -0800 (PST) Received: from localhost ([122.178.198.250]) by mx.google.com with ESMTPSA id ex11sm840938pac.19.2015.01.27.00.36.44 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 27 Jan 2015 00:36:44 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, sboyd@codeaurora.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH 01/18] cpufreq: Drop cpufreq_disabled() check from cpufreq_cpu_{get|put}() Date: Tue, 27 Jan 2015 14:06:07 +0530 Message-Id: <59b0050553f89e00298b585ba89d2627a0fab164.1422346933.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.3.0.rc0.44.ga94655d 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.43 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: , Even if cpufreq is disabled then also the per-cpu variable will return NULL and things will continue working as is. Remove this unnecessary check. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index ca69f42b8e1e..72990ba59fad 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -203,7 +203,7 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) struct cpufreq_policy *policy = NULL; unsigned long flags; - if (cpufreq_disabled() || (cpu >= nr_cpu_ids)) + if (cpu >= nr_cpu_ids) return NULL; if (!down_read_trylock(&cpufreq_rwsem)) @@ -230,9 +230,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); }