From patchwork Wed Jul 19 10:12:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 9851255 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CB4B602C8 for ; Wed, 19 Jul 2017 10:14:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C76F223A1 for ; Wed, 19 Jul 2017 10:14:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DDEF20881; Wed, 19 Jul 2017 10:14:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBE8C20881 for ; Wed, 19 Jul 2017 10:14:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754379AbdGSKOl (ORCPT ); Wed, 19 Jul 2017 06:14:41 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:36463 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754274AbdGSKN0 (ORCPT ); Wed, 19 Jul 2017 06:13:26 -0400 Received: by mail-pf0-f171.google.com with SMTP id o88so18902189pfk.3 for ; Wed, 19 Jul 2017 03:13:26 -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=wyFymjBuTZYWacJf584+rWHVYXX3cte10CYWu8ToLTI=; b=KSWmfFfs+uET2KVucsv7z+My9NjiojOR2iYoJ/sNL/v+j1gINISjs8B74Mg5OnEDA9 5tIrQefADUdeHuY0ipck4LFtF1Dp4cG2O2LBnf188OS4BznKhk8BIVsSp98c2FJIBKRS 37f4SV2hrVK9HoziZ7n13/600hqeMuzbRK7Uk= 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=wyFymjBuTZYWacJf584+rWHVYXX3cte10CYWu8ToLTI=; b=TjVMn+f/jEPSFTjVKJmqPbEH8e7fzg7uoZUhixa7KoM98w9UXYOyIjni8jPCItJk7w U1aB0+StSmnvqGYhUYHmHqNd0jbr30luNiTua+y8zBLN8Q5Yk8aw5bs4cp3MDa2UNxA0 xFHZ9BgGqNWZUJSqX4bkBW7cL3gl1RSnnd36yH3b8hYq0j9wiF9x528dMBRTXs6LidFX xCtIpJ1xUOWFtgjGFpP0OZBQMUxbe7IBOdHOLko/QCzsfWMPVjKucu1FLgU+D1A2B1gF SaHyri3SfsYB2UO0xbcNkbQ/cGzy2m62KM8WkfbQCSOlUrtiN/3XsxyUPunLdV0USxJC VQBQ== X-Gm-Message-State: AIVw113aYukYG6ga37JT1sW2gD1atPnce0r9WFIDyIMd5ZYQ3oPuj0N0 njk9UdmHvUFVKNpH X-Received: by 10.99.102.65 with SMTP id a62mr2261995pgc.59.1500459206182; Wed, 19 Jul 2017 03:13:26 -0700 (PDT) Received: from localhost ([122.167.171.93]) by smtp.gmail.com with ESMTPSA id h3sm12188527pfj.72.2017.07.19.03.13.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jul 2017 03:13:25 -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: [PATCH V3 5/9] cpufreq: arm_big_little: Make ->get_transition_latency() mandatory Date: Wed, 19 Jul 2017 15:42:45 +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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index ea6d62547b10..17504129fd77 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; }