From patchwork Fri Jun 19 11:48:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 50084 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7D9E8218C9 for ; Fri, 19 Jun 2015 11:49:18 +0000 (UTC) Received: by wibee9 with SMTP id ee9sf1358518wib.1 for ; Fri, 19 Jun 2015 04:49:17 -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=EC0SZxxt0O3A4qaA0w2/FFM8/ecl7i3WxyJpa4uObaI=; b=Sh5nyJhZHqs2ZW5S9KsL3eOjTn1eZXo5B6MeJ1TYWn+QHUB7P6IT9lfK7NO32Qnd+b x/js3qqdOViyZzkWmdidJ928lPHfe6pGA9ewF3JPZFOaT6Px32uKsKqzg70DF1plQDSh GW0AvqDAkR2TVH/7k5ansUbUm91NhFmMWxYzajDayQ1MxOkeJIgXh2NoX25CiLk3TLI2 a3ESW+rq7r6JEAai7G6mhAiAfvhzC7wBNaOgEvjAbHB8gUZCmwv38IjIwGt6BuoU2x/C QVbBNfkAwmnn9MWteR+gMAcyJe3nC9Nt+26/tUiEn5zIWKHk3Bqt3IkW2rQcXfQv5U03 DDdA== X-Gm-Message-State: ALoCoQl3iUdMYGscz0Wdb70q5Mgpky7xdEy4m5+VJJ/LcbyrZyBQsnG/o6Q584OnFdQWgGCExFZ4 X-Received: by 10.112.203.168 with SMTP id kr8mr14797183lbc.10.1434714557687; Fri, 19 Jun 2015 04:49:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.65 with SMTP id o1ls622579laj.108.gmail; Fri, 19 Jun 2015 04:49:17 -0700 (PDT) X-Received: by 10.152.23.167 with SMTP id n7mr17523237laf.108.1434714557539; Fri, 19 Jun 2015 04:49:17 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id wz10si8959366lbb.138.2015.06.19.04.49.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2015 04:49:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laka10 with SMTP id a10so72583291lak.0 for ; Fri, 19 Jun 2015 04:49:17 -0700 (PDT) X-Received: by 10.152.1.40 with SMTP id 8mr17818579laj.56.1434714557443; Fri, 19 Jun 2015 04:49:17 -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 hn6csp529318lbb; Fri, 19 Jun 2015 04:49:16 -0700 (PDT) X-Received: by 10.66.165.8 with SMTP id yu8mr31129077pab.82.1434714550415; Fri, 19 Jun 2015 04:49:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si16100144pde.8.2015.06.19.04.49.09; Fri, 19 Jun 2015 04:49:10 -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 S1751544AbbFSLtD (ORCPT + 11 others); Fri, 19 Jun 2015 07:49:03 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36373 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbbFSLtC (ORCPT ); Fri, 19 Jun 2015 07:49:02 -0400 Received: by paceq1 with SMTP id eq1so59353023pac.3 for ; Fri, 19 Jun 2015 04:49:01 -0700 (PDT) X-Received: by 10.69.17.130 with SMTP id ge2mr30611423pbd.75.1434714541723; Fri, 19 Jun 2015 04:49:01 -0700 (PDT) Received: from localhost ([122.167.70.98]) by mx.google.com with ESMTPSA id dv9sm11076068pac.4.2015.06.19.04.49.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Jun 2015 04:49:01 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Preeti U Murthy , ke.wang@spreadtrum.com Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, ego@linux.vnet.ibm.com, paulus@samba.org, shilpa.bhat@linux.vnet.ibm.com, prarit@redhat.com, robert.schoene@tu-dresden.de, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH V2 09/10] cpufreq: governor: Don't WARN on invalid states Date: Fri, 19 Jun 2015 17:18:09 +0530 Message-Id: <0aad2a5bf19a29dda47cfc071ff453c8117a0713.1434713657.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.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.48 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: , 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-by: Preeti U Murthy Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_governor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 8d4c86fa43ec..af63402a94a9 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; }