From patchwork Thu Jul 13 05:40:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 107546 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1780300qge; Wed, 12 Jul 2017 22:42:09 -0700 (PDT) X-Received: by 10.98.178.150 with SMTP id z22mr59097045pfl.165.1499924529183; Wed, 12 Jul 2017 22:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499924529; cv=none; d=google.com; s=arc-20160816; b=GEegCY0m1P6oIkvuD0efxaFwC/KN1W5iqtCae4MqUKrMz9NjHxmguswt3y+LYGGacj 1ExYiwZf+74PDcJNw1qvscq07sy/wgWGI1iOQK9xAwoDVsl49JJF+tJJJ1f/pAo8/hvL rV2E/fPNnF95ORA4KXkYOeRPtNfoNFbgbyFzxSQq0mvHzFGnzxBhwPBdf89qpf8OT0gR XII13zrmEjNwmAV22LjlJqHG46A4fF63TeE8YuKZFhkHEYVXpz6lRG377uDxHqh3dzon bvRexEUyxuwyVgeU6y6tUe9nh2eFetlaGVKEmS5Md30dZwfuS7WvZkXAzM69KsGagGBu l0iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=k1rtmZWEmosz7Z2ks/yjwjhUuUT4g3R0I4NYWGFg4vs=; b=gDyWbTit90TNlRu6mDGz7FtblM8vW3AEIa06Yf/0BTZDaJlg6chm4yJOI20DUJotrX IBSJ1rdY31YH8LCXQTY+o+uJXptm1wq2u6gt0lxKWwDWdGr/S+QrL/Mfgq9+T6asgio2 Ik03lUH3bE181mIFfPXAwRmvQgOhfvPbgtuwSouncswtaXB+yrKwc2MhXSq+0SaQt8FM NczOC93NPL+IgoNudHnwNIXRMPRWrAjfmRUh77v4SGgUJyyovxTqMgcA3c/W9BKGwJQF unOFPvTEqLGUFGplaYMOumn8Hu8fYMMZLJ4CWVUNQiXiaFJsPuuScP5tX7dnTBBS6x+b bP1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=ReUYyUke; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si3609659pld.330.2017.07.12.22.42.08; Wed, 12 Jul 2017 22:42: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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=ReUYyUke; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751208AbdGMFlz (ORCPT + 14 others); Thu, 13 Jul 2017 01:41:55 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:34156 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbdGMFlx (ORCPT ); Thu, 13 Jul 2017 01:41:53 -0400 Received: by mail-pf0-f176.google.com with SMTP id q85so23975185pfq.1 for ; Wed, 12 Jul 2017 22:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=k1rtmZWEmosz7Z2ks/yjwjhUuUT4g3R0I4NYWGFg4vs=; b=ReUYyUkevFqvGlkG03E24KWsDuI3wpbZkDzBiuM5YS9GLvdpHoVfXGqi9fuZOSwY/c EesvjjZI/jRKp5GO+nt19UIClJ4cFA5Vpe7y1InBRYHrPWeHt1badX0g7ZvuXKkEJ9jo f2+CSMty+AQKYo0RcnMusnUeAkr/eFR/BcXy0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=k1rtmZWEmosz7Z2ks/yjwjhUuUT4g3R0I4NYWGFg4vs=; b=boftyyVziLx3fWIfxSJoaifuO5S3199JxTs+KHWfDjF4dybD27c+Fgiadz1hNMpAHn bRJEu3XVXnrkvrmlxlYNWDFe8SQJM6H4DdTKVExOyHJEBe1Uy3xpxjOAW2HhFvlZq7Il st5MXRw9kf1szC0MPllxYdDkZV/qXd8tVT2F41HrVQpJKeKEGoAClJ2Qml0/nsejgZdf LGJ17fyeSJnrIXBvIbPiiPGXf9JkniZ6NHffu71itNpNDMftlO1c2+wlDVbUze9E/tbq ARdVhF/I7OVzM+yEA4J/jlWQUlZ8ZoECg8tJyr2s0ZTt8tHhDeqQHmdOJmOZG1SwEqwt w6Rg== X-Gm-Message-State: AIVw112TyO2OHEoa2Mjdv59DZVKeUKqtWrsBES0EnGoL/V2g9UUArAV2 XkKLVW2RayKN4oskHxgJ3w== X-Received: by 10.84.229.13 with SMTP id b13mr8193561plk.1.1499924507540; Wed, 12 Jul 2017 22:41:47 -0700 (PDT) Received: from localhost ([122.171.81.230]) by smtp.gmail.com with ESMTPSA id a71sm9561578pfl.129.2017.07.12.22.41.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jul 2017 22:41:47 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Sudeep Holla Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux@dominikbrodowski.net, linux-kernel@vger.kernel.org Subject: [RFC V2 6/6] cpufreq: arm_big_little: Make ->get_transition_latency() mandatory Date: Thu, 13 Jul 2017 11:10:57 +0530 Message-Id: X-Mailer: git-send-email 2.13.0.71.gd7076ec9c9cb In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org All users of arm_big_little driver are defining it and there is no need to keep it optional. Make it mandatory to remove the always true conditional statement. Signed-off-by: Viresh Kumar --- drivers/cpufreq/arm_big_little.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.13.0.71.gd7076ec9c9cb diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index 418042201e6d..d1eb2a53b61f 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -483,11 +483,8 @@ static int bL_cpufreq_init(struct cpufreq_policy *policy) return ret; } - if (arm_bL_ops->get_transition_latency) - policy->cpuinfo.transition_latency = - arm_bL_ops->get_transition_latency(cpu_dev); - else - policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; + policy->cpuinfo.transition_latency = + arm_bL_ops->get_transition_latency(cpu_dev); if (is_bL_switching_enabled()) per_cpu(cpu_last_req_freq, policy->cpu) = clk_get_cpu_rate(policy->cpu); @@ -622,7 +619,8 @@ int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops) return -EBUSY; } - if (!ops || !strlen(ops->name) || !ops->init_opp_table) { + if (!ops || !strlen(ops->name) || !ops->init_opp_table || + !ops->get_transition_latency) { pr_err("%s: Invalid arm_bL_ops, exiting\n", __func__); return -ENODEV; }