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: 108265 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp665795obm; Wed, 19 Jul 2017 03:14:44 -0700 (PDT) X-Received: by 10.98.24.21 with SMTP id 21mr2295181pfy.190.1500459284151; Wed, 19 Jul 2017 03:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500459284; cv=none; d=google.com; s=arc-20160816; b=ndmVI/wUbNlxNjoDBBxfO1YZCQ2gzsJzbR5rpoPA/I0KityAuxw9W3leUfX2pwsYbe kBGWjc/sajCWss0UIMmfdH26YO6vMSFeGXRpVrjSX/1VYajQ6qgywYGsyXFhb4DTLdXl Pg3kyexmaQtKL1wGcKG3nU3TcdL3NcpnyXWAJmyqrB5WLXvxclAbyV9fgyxNlgbe5Ug+ KIZcxsj88HnepZ5VAqPD9OTFKQ0gWFkCTYUjWFF3WpDsVdRAtHOfINPSG0lXbGE5+vSb AtYvde12AQbanGUdVza2NTF1vqigThQOHXNrZR4QGfKgmY+7ezUCT2HBWcoSBvt18QV9 wRrA== 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=wyFymjBuTZYWacJf584+rWHVYXX3cte10CYWu8ToLTI=; b=oPzjiw1VoEm0ONOq1EApv28nxu6zK/hxjDcBFU0hC+MSabhN9DCC6kCu/EMYUeD18b jGi/1fNf8XbvsU1MVgpgtB8be16UdqGwaUGeezqN6XEaQKI5fUyxtT54cLPZ0aTnYqdK vF9OXAJMvZ6RAdfTS1myl1xDbVF3QqumooU9yh1dzSBq+gtBVOhwxAPkfJ4HgNODAsa0 EhgvpXvVjaBhZhIzy/MqLz1XNA7RjQqxp3F0fizb4LubeiGicPPkDXpgm5z0Lfbiljnt PDZqM5s/Ca+PyDd66MaKUyEVvinJZ86PyTZaXzkpGCvg/GKShIUUUwvPC1Y3gpMf9b2Q veiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=KSWmfFfs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 1si2487200pln.153.2017.07.19.03.14.43; Wed, 19 Jul 2017 03:14:44 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=KSWmfFfs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1754469AbdGSKOl (ORCPT + 25 others); Wed, 19 Jul 2017 06:14:41 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33605 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754278AbdGSKN0 (ORCPT ); Wed, 19 Jul 2017 06:13:26 -0400 Received: by mail-pf0-f179.google.com with SMTP id s70so16177198pfs.0 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=BcPLd9jL7TQDctA1vmomJizEKA26ehXuS3Aw6x+9kL6mGybEaUwhEJQ06MHsDyyCpF STApuYz1pfE5viZ8OmtQ918kpiG9vCed2urNGrFKTg4+v242zOwxNKhef0hQYkDIC1mb OlpfGJzPxjxjIoBcy5mkab0kz9l8PI6NRPy1jZo0OYxSneqOTK0Q0LZGuYIM1Jx/NMmM +cnz+r7vZHigpH+A4mZuOHiMLO5/icNdoVzCKHqhjfCzKLqhNIMP+7FK7r0DlovsnDIY S21NlJHFSqPiZ+i0LoNrsQVVNmRXBEz5tqyg6mX5sd4XDIgxPrxi4orn+XUVRMhftYka VaxQ== X-Gm-Message-State: AIVw111qEkkHhGPeBARwC/WDB/lvoEt1gnR4Oh63KZqA9m1FcJB1MWd4 yZEvgfMKVEO8lIRe 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 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; }