Message ID | c7f223f96fe2da64ca54669178cf76e444d7be2e.1437199001.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBTWXU6WQKGQERGDQ77A@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DB9D822A28 for <linaro@patches.linaro.org>; Sat, 18 Jul 2015 06:01:51 +0000 (UTC) Received: by lbvb1 with SMTP id b1sf29699971lbv.3 for <linaro@patches.linaro.org>; Fri, 17 Jul 2015 23:01:50 -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=f0CSp51sxAcPx0W5J4A6uN+qaLPHJdVKx+7G2/gh3hc=; b=ccrK2vhxAAcxcMshmYUNbQxHtK0TYv4UXF7UUiYYCudcipIUMZ5aWj8w+CRHqqcORH +eoJareA3K2ur+anpSCDQG4xh45JJdbc22Oc+cLxFbckz8pbWVEn+AocDH2/Uo3/SUIC YeyZk+ie5iS2Aw/GtBkRtN6V4tFhjAL42RhTUijgVoLfF8f4yWIJOd868xsskExI7acu /IgeyHa5Lo14aWKKB4su6eDQ5475UjiDTivXA0d0kLAVVJcG1UY6X9p9bznBLWm6Fnwn oDnVvDFWkRZZjpI2g7d6HWmvSF2t7johPtWB2rIsRQZvEFTU5E7jc7c6yUP7M2FuLDRK aowA== X-Gm-Message-State: ALoCoQlvstyTjZx2p1gNpfZeNSTxGtv444Uv1Ac+amg52FFatQindAvjtFUtf+AJXnoTrQoj+uIO X-Received: by 10.180.182.49 with SMTP id eb17mr700367wic.2.1437199310879; Fri, 17 Jul 2015 23:01:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.199 with SMTP id m7ls590768lam.83.gmail; Fri, 17 Jul 2015 23:01:50 -0700 (PDT) X-Received: by 10.112.10.166 with SMTP id j6mr15947608lbb.120.1437199310688; Fri, 17 Jul 2015 23:01:50 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id cb8si11700222lad.61.2015.07.17.23.01.50 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jul 2015 23:01:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbbpo10 with SMTP id po10so70734814lbb.3 for <patchwork-forward@linaro.org>; Fri, 17 Jul 2015 23:01:50 -0700 (PDT) X-Received: by 10.112.220.7 with SMTP id ps7mr17498970lbc.72.1437199310559; Fri, 17 Jul 2015 23:01:50 -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.108.230 with SMTP id hn6csp162768lbb; Fri, 17 Jul 2015 23:01:48 -0700 (PDT) X-Received: by 10.70.3.98 with SMTP id b2mr36148622pdb.107.1437199307539; Fri, 17 Jul 2015 23:01:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sg9si22192475pac.108.2015.07.17.23.01.46; Fri, 17 Jul 2015 23:01:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S1755669AbbGRGBb (ORCPT <rfc822;matthew.hart@linaro.org> + 28 others); Sat, 18 Jul 2015 02:01:31 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36724 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755467AbbGRGB2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 18 Jul 2015 02:01:28 -0400 Received: by pdjr16 with SMTP id r16so73190452pdj.3 for <linux-kernel@vger.kernel.org>; Fri, 17 Jul 2015 23:01:28 -0700 (PDT) X-Received: by 10.68.179.228 with SMTP id dj4mr35819582pbc.141.1437199288334; Fri, 17 Jul 2015 23:01:28 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id oa3sm13167314pbb.23.2015.07.17.23.01.27 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Jul 2015 23:01:27 -0700 (PDT) From: Viresh Kumar <viresh.kumar@linaro.org> To: Rafael Wysocki <rjw@rjwysocki.net> Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar <viresh.kumar@linaro.org>, linux-kernel@vger.kernel.org (open list) Subject: [PATCH V3 4/5] cpufreq: governor: Don't WARN on invalid states Date: Sat, 18 Jul 2015 11:31:02 +0530 Message-Id: <c7f223f96fe2da64ca54669178cf76e444d7be2e.1437199001.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: <cover.1437199001.git.viresh.kumar@linaro.org> References: <2874468.iRvuV1Y9DI@vostro.rjw.lan> <cover.1437199001.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1437199001.git.viresh.kumar@linaro.org> References: <cover.1437199001.git.viresh.kumar@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@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.177 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/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index f225dc975415..939197ffa4ac 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -543,7 +543,7 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, else dbs_data = cdata->gdbs_data; - if (WARN_ON(!dbs_data && (event != CPUFREQ_GOV_POLICY_INIT))) { + if (!dbs_data && (event != CPUFREQ_GOV_POLICY_INIT)) { ret = -EINVAL; goto unlock; }
With previous commit, governors have started to return errors on invalid state-transition requests. We already have a WARN for an invalid state-transition request in cpufreq_governor_dbs(). This does trigger today, as the sequence of events isn't guaranteed by cpufreq core. Lets stop warning on that for now, and make sure we don't enter an invalid state. Reviewed-and-tested-by: Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/cpufreq_governor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)