Message ID | 47594802e96dc2b1e727fd88f92b3fa4459b4d09.1438239727.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBD4446WQKGQEOETZMRY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 4F37A22DB5 for <linaro@patches.linaro.org>; Thu, 30 Jul 2015 07:11:12 +0000 (UTC) Received: by lahh5 with SMTP id h5sf9284876lah.0 for <linaro@patches.linaro.org>; Thu, 30 Jul 2015 00:11:11 -0700 (PDT) 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=RXaFtMcBGoycomHB5JJOAZ/BRSs/8JWJast9TkevRXc=; b=ChoVnjmcL3TkmpwoyRHsIVDCZQ0E/BVG+KSL4WiuEL9r6ZSDjuwy2gfPC8KFdYXoVn RvWRaUMeN47NuORgxEVcfvFYWs8aRVv2G3hXOVoeVgQCmyv8tf0Iki1+SIM4teLy4JFS uKOvgAF2PZFIE5kExsp3uSNYj8U+pX0ijE7kTxfCxIQh0sk2QlEJnTOU7VC9yZAeqJmx LJJQKRadx/+LJedTltNvVwUpFFtMb1S3phQBO3iFd5l0KlQe4uHryleRrOSTjtdL5jxP qrHLGpSHq8ZnSnPUaC3yA3Do5jq0Tn2irerxlOmib3bmcYiBgRtxv2VYtFvZistYK5G6 hy8w== X-Gm-Message-State: ALoCoQlVKI9902VT8AIaMJxnMHUpVSxxKHRoNsrKB6akn/u0kwjTzRKEsbx+Buv+Vk+WCNeev9dB X-Received: by 10.194.219.234 with SMTP id pr10mr5010493wjc.2.1438240271328; Thu, 30 Jul 2015 00:11:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.100 with SMTP id a4ls140871lah.52.gmail; Thu, 30 Jul 2015 00:11:10 -0700 (PDT) X-Received: by 10.152.6.130 with SMTP id b2mr43925900laa.78.1438240270908; Thu, 30 Jul 2015 00:11:10 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id ja8si105996lbc.57.2015.07.30.00.11.10 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 00:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbbst4 with SMTP id st4so20935104lbb.1 for <patchwork-forward@linaro.org>; Thu, 30 Jul 2015 00:11:10 -0700 (PDT) X-Received: by 10.112.133.72 with SMTP id pa8mr42595566lbb.117.1438240270709; Thu, 30 Jul 2015 00:11:10 -0700 (PDT) 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.7.198 with SMTP id l6csp361664lba; Thu, 30 Jul 2015 00:11:09 -0700 (PDT) X-Received: by 10.70.125.129 with SMTP id mq1mr104578544pdb.19.1438240269439; Thu, 30 Jul 2015 00:11:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si212934pdl.254.2015.07.30.00.11.08; Thu, 30 Jul 2015 00:11:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753818AbbG3HK6 (ORCPT <rfc822;pi-cheng.chen@linaro.org> + 12 others); Thu, 30 Jul 2015 03:10:58 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33894 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbbG3HK5 (ORCPT <rfc822;linux-pm@vger.kernel.org>); Thu, 30 Jul 2015 03:10:57 -0400 Received: by pacan13 with SMTP id an13so19150174pac.1 for <linux-pm@vger.kernel.org>; Thu, 30 Jul 2015 00:10:56 -0700 (PDT) X-Received: by 10.66.221.138 with SMTP id qe10mr100330611pac.45.1438240256702; Thu, 30 Jul 2015 00:10:56 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id cr4sm331623pac.10.2015.07.30.00.10.55 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 Jul 2015 00:10:56 -0700 (PDT) From: Viresh Kumar <viresh.kumar@linaro.org> To: edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, linux-pm@vger.kernel.org, radivoje.jovanovic@linux.intel.com, punit.agrawal@arm.com, Viresh Kumar <viresh.kumar@linaro.org>, linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/6] thermal/cpu_cooling: quit early after updating policy Date: Thu, 30 Jul 2015 12:40:31 +0530 Message-Id: <47594802e96dc2b1e727fd88f92b3fa4459b4d09.1438239727.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: <cover.1438239727.git.viresh.kumar@linaro.org> References: <cover.1438239727.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1438239727.git.viresh.kumar@linaro.org> References: <cover.1438239727.git.viresh.kumar@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> 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.217.172 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index d010c6d0d722..276cec5a1fb7 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -232,6 +232,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, if (policy->max != max_freq) cpufreq_verify_within_limits(policy, 0, max_freq); + break; } mutex_unlock(&cooling_cpufreq_lock); break;
If a valid cpufreq_dev is found for policy->cpu, we should update the policy and quit the for loop. There is no need to keep traversing the list of cpufreq_dev's. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/thermal/cpu_cooling.c | 1 + 1 file changed, 1 insertion(+)