From patchwork Wed May 9 17:07:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 135317 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp5261lji; Wed, 9 May 2018 10:12:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwqS0Ez3LPBwieeTSz0d8+dCLk284DKKXbDSvPVhLd1ZcQdcEpp17SQSCbfrNKVyi9iBbf X-Received: by 10.98.68.156 with SMTP id m28mr38952742pfi.145.1525885969074; Wed, 09 May 2018 10:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525885969; cv=none; d=google.com; s=arc-20160816; b=0gurLPIboIebcuz6IP21+hTPWXUy3L4VEeBAxcUiJJS/6CBDaiywWPi/dm6nHOUnLj RBsuzRpEULXsch4/TFNwoSpjJni8PaFeRGKuUOuNdJKobtuOY+7IiTujhflLWHgwcC6b 4Bc4DR5Wg0jp7yf9TJLU7jJN8P0TBV6J9lrJBSXInQB5WAskwqblUrfDFZAbI+UyNMXb KWzC6Dx14Tzi1Foe+7msOHKhS4P/m/W/z/zeA5CIGPKIbIwouf0nD4zi/NDdhiDXm70i aOL4voPoO0t8voeJZFjlAtu6uA/FGLxJKHXB0QTOF3Ff6HfLqEOfKGhCdtalBPzlREmb zfBw== 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:message-id:date :subject:cc:to:from:arc-authentication-results; bh=0Owq8yOW6oWk0tkC9jKumjeYtnJtrkJuPF+5PVrDWtA=; b=xDvg0qvkq+VOckVEGxah6wwnhilRCyjOaxwJGwqM1BZiz0oaFS0Dw+Gs4W0kVEaF7o 2RrWB/rEeepQRd76ymv2HLxTE+E00ARp/bF/mTJGFgPcLKrQCsOwFVR2pm6CTUh26vUi C0NrZT2tqah/B8rKfg6U73UEGHRnh7D3znvJrk02aldBmij0noLaho2FKuJnl7BLEJhA 2W62Cype9k9uwuUDGWVvUeCjpUx2scYRqd/bZ2utHrOQZZ6Y3g+uzd1QGhC4GUSnrTga t+AXIP7V0KMYDI8N00M1esyFhuBychO6xvGbXUCwZj5nVisUiYk9ti77D73a/JpmxM+r YXyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j33-v6si16858745pld.151.2018.05.09.10.12.48; Wed, 09 May 2018 10:12:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965693AbeEIRMs (ORCPT + 10 others); Wed, 9 May 2018 13:12:48 -0400 Received: from foss.arm.com ([217.140.101.70]:47282 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965594AbeEIRMr (ORCPT ); Wed, 9 May 2018 13:12:47 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 55D581650; Wed, 9 May 2018 10:12:47 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6B65A3F592; Wed, 9 May 2018 10:12:46 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, Jonathan Cameron Cc: Sudeep Holla , linux-pm@vger.kernel.org Subject: [PATCH 3/8] firmware: arm_scmi: rename get_transition_latency and add_opps_to_device Date: Wed, 9 May 2018 18:07:09 +0100 Message-Id: <1525885634-22348-4-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525885634-22348-1-git-send-email-sudeep.holla@arm.com> References: <1525885634-22348-1-git-send-email-sudeep.holla@arm.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Most of the scmi code follows the suggestion from Greg KH on a totally different thread[0] to have the subsystem name first, followed by the noun and finally the verb with couple of these exceptions. This patch fixes them so that all the functions names are aligned to on practice. [0] https://www.spinics.net/lists/arm-kernel/msg583673.html Signed-off-by: Sudeep Holla --- drivers/cpufreq/scmi-cpufreq.c | 4 ++-- drivers/firmware/arm_scmi/perf.c | 10 +++++----- include/linux/scmi_protocol.h | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) -- 2.7.4 Reviewed-by: Jonathan Cameron diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index b4dbc77459b6..50b1551ba894 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -117,7 +117,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) return -ENODEV; } - ret = handle->perf_ops->add_opps_to_device(handle, cpu_dev); + ret = handle->perf_ops->device_opps_add(handle, cpu_dev); if (ret) { dev_warn(cpu_dev, "failed to add opps to the device\n"); return ret; @@ -164,7 +164,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) /* SCMI allows DVFS request for any domain from any CPU */ policy->dvfs_possible_from_any_cpu = true; - latency = handle->perf_ops->get_transition_latency(handle, cpu_dev); + latency = handle->perf_ops->transition_latency_get(handle, cpu_dev); if (!latency) latency = CPUFREQ_ETERNAL; diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 987c64d19801..611ab08e6174 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -349,8 +349,8 @@ static int scmi_dev_domain_id(struct device *dev) return clkspec.args[0]; } -static int scmi_dvfs_add_opps_to_device(const struct scmi_handle *handle, - struct device *dev) +static int scmi_dvfs_device_opps_add(const struct scmi_handle *handle, + struct device *dev) { int idx, ret, domain; unsigned long freq; @@ -383,7 +383,7 @@ static int scmi_dvfs_add_opps_to_device(const struct scmi_handle *handle, return 0; } -static int scmi_dvfs_get_transition_latency(const struct scmi_handle *handle, +static int scmi_dvfs_transition_latency_get(const struct scmi_handle *handle, struct device *dev) { struct perf_dom_info *dom; @@ -432,8 +432,8 @@ static struct scmi_perf_ops perf_ops = { .level_set = scmi_perf_level_set, .level_get = scmi_perf_level_get, .device_domain_id = scmi_dev_domain_id, - .get_transition_latency = scmi_dvfs_get_transition_latency, - .add_opps_to_device = scmi_dvfs_add_opps_to_device, + .transition_latency_get = scmi_dvfs_transition_latency_get, + .device_opps_add = scmi_dvfs_device_opps_add, .freq_set = scmi_dvfs_freq_set, .freq_get = scmi_dvfs_freq_get, }; diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index a171c1e293e8..f4c9fc0fc755 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -85,8 +85,8 @@ struct scmi_clk_ops { * @level_set: sets the performance level of a domain * @level_get: gets the performance level of a domain * @device_domain_id: gets the scmi domain id for a given device - * @get_transition_latency: gets the DVFS transition latency for a given device - * @add_opps_to_device: adds all the OPPs for a given device + * @transition_latency_get: gets the DVFS transition latency for a given device + * @device_opps_add: adds all the OPPs for a given device * @freq_set: sets the frequency for a given device using sustained frequency * to sustained performance level mapping * @freq_get: gets the frequency for a given device using sustained frequency @@ -102,10 +102,10 @@ struct scmi_perf_ops { int (*level_get)(const struct scmi_handle *handle, u32 domain, u32 *level, bool poll); int (*device_domain_id)(struct device *dev); - int (*get_transition_latency)(const struct scmi_handle *handle, + int (*transition_latency_get)(const struct scmi_handle *handle, struct device *dev); - int (*add_opps_to_device)(const struct scmi_handle *handle, - struct device *dev); + int (*device_opps_add)(const struct scmi_handle *handle, + struct device *dev); int (*freq_set)(const struct scmi_handle *handle, u32 domain, unsigned long rate, bool poll); int (*freq_get)(const struct scmi_handle *handle, u32 domain,