From patchwork Fri Jan 2 07:04:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42687 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CCC1A26CD1 for ; Fri, 2 Jan 2015 07:05:57 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf10365639lab.11 for ; Thu, 01 Jan 2015 23:05:56 -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=hnFPLS189TQTslf5Y3zgUInCTnigFsk8w6RtYziybP4=; b=lnV7XK/QdoLpMG0XKNfsNzeRCNtcFVfwakJQpolp1w6pSGXqdJC10/yRWkKqySKCFk QQt6ZHhnVK6iY24+fiCyYAX/mRq5aS158v3LJ6d/NOnYs8zQYCV6a1J/bP0UgzF5Pd9E 1rXFEiTqFV1V0p2k7cT6SB04tt1qHixFp82YJHh6RzQWusbWt9NTLYHtdBiMwwocLcAD ywgaM7Wmt52nYzhhGCHE11PLyJnG5FVmq/dWLdy1w9h6Lxa3zvkHFplSqihodueZeH73 mZO0O/pQVCHLVDPD4bKG1mBrxFpx8nM1r8Tg64BSPnzyM0VQDHwSZqlSrVn62lcVQWbD FrQw== X-Gm-Message-State: ALoCoQluhqaakVCSJRaEgrTqUM24ztULfjpq1ayimQtSDVipeN9tbrSsirWCNkDRjkJJ6dhh6+KR X-Received: by 10.194.95.74 with SMTP id di10mr8634814wjb.0.1420182356808; Thu, 01 Jan 2015 23:05:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.162 with SMTP id kr2ls2286802lac.36.gmail; Thu, 01 Jan 2015 23:05:56 -0800 (PST) X-Received: by 10.112.188.201 with SMTP id gc9mr37995158lbc.6.1420182356651; Thu, 01 Jan 2015 23:05:56 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id h2si50464850lbv.49.2015.01.01.23.05.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:56 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id gd6so15444320lab.3 for ; Thu, 01 Jan 2015 23:05:56 -0800 (PST) X-Received: by 10.152.197.5 with SMTP id iq5mr74381026lac.6.1420182356567; Thu, 01 Jan 2015 23:05:56 -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 c8csp126235lbb; Thu, 1 Jan 2015 23:05:55 -0800 (PST) X-Received: by 10.68.193.135 with SMTP id ho7mr21651922pbc.103.1420182354055; Thu, 01 Jan 2015 23:05:54 -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.52; Thu, 01 Jan 2015 23:05:54 -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 S1750767AbbABHFw (ORCPT + 12 others); Fri, 2 Jan 2015 02:05:52 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:51362 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbbABHFv (ORCPT ); Fri, 2 Jan 2015 02:05:51 -0500 Received: by mail-pa0-f53.google.com with SMTP id kq14so23338426pab.26 for ; Thu, 01 Jan 2015 23:05:51 -0800 (PST) X-Received: by 10.66.121.168 with SMTP id ll8mr120285837pab.34.1420182351430; Thu, 01 Jan 2015 23:05:51 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id f12sm45549560pdm.90.2015.01.01.23.05.50 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:50 -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 15/17] cpufreq: don't check if cpu > nr_cpu_ids Date: Fri, 2 Jan 2015 12:34:36 +0530 Message-Id: <9c5002262cb37915c7aa117814831a9017bda2db.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.44 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: , I don't know for what kind of callers do we have this check for. The problem is that such checks introduce an unnecessary delay for the good users. So, I am dropping it for now, let me know if this is a bad change. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 09426671eb79..14d637a28dd8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -202,7 +202,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 (cpufreq_disabled()) return NULL; if (!down_read_trylock(&cpufreq_rwsem))