From patchwork Fri Oct 18 10:37:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 176791 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp662887ill; Fri, 18 Oct 2019 03:38:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5lZo3UYLpul7sOm3cIlIoz6xxk5VZHB474fQCtAe1F2GqwVZyGY3y9laZbbhx3jdELO5N X-Received: by 2002:a17:907:10d3:: with SMTP id rv19mr7613657ejb.301.1571395105719; Fri, 18 Oct 2019 03:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571395105; cv=none; d=google.com; s=arc-20160816; b=ySlUnB9U4GAvWp2fooY7xkdTUa8A5zuWt6rU+IEPNVK6JrOMUoVZHorDj9KJT55Fvw 5ammxIN+apLcbwTuOlMnjuMfsTq9JrmJQ8p9tSjrUHU0GuG6yRG7pksLBPvNYVkmpD4x pdIIPUUf9LSuYQpIkf292kh30be0jsLd9bbR5xd1Dei2rctHLeTaboHe9IumQQOdAJw+ YR2zlmbwMAf9TWFNWM6AawJQAAywvTSBNL0reYTrY+mxYNWgMcsK6JkqKeeFcHVaYmM0 y8z9P4sWnztIgsvHtZndAf3VSJLkQJEN3J5/6SFJNEm72zLsfS3b0v9Yz1+K5ymBHGJ9 GPYQ== 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; bh=GUUicsU6lCPcb1839FPn721wz/Tsh7RkRnUYrQAeJm4=; b=HXNFjtI3qKWi3FLTZodV2XpBMhxPm1MoxLeR/iumng02qXXqZHk5unBQXFbgWsjm3q 2yYDOv8yXoZcFZzy70ZAOkFCl6gImP2zG8+YGf3veEi7IvS/HWNknM2obIDE0sR5psLz FBdgTVOJ5b0A0o+BM+gxgykOl3U/wTuY0MhlTCwIN2x82/TDxrSBus4gaYu+QChZtWKT tHWMH83uyRm7eh9bMsVazzeyJlJ758/2Z5n6oExspBlY4VsXQ3jv+TC800nQwM/O8UJp LSfVcBbZr2QavRzVwIJ7NjBpOwWIrijExIOKoXY0nKBOAiAroDQCV1MWcmLa3FCPucAP ybgA== 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 y10si3131497ejw.76.2019.10.18.03.38.25; Fri, 18 Oct 2019 03:38:25 -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 S2408321AbfJRKiY (ORCPT + 10 others); Fri, 18 Oct 2019 06:38:24 -0400 Received: from [217.140.110.172] ([217.140.110.172]:34206 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S2408311AbfJRKiX (ORCPT ); Fri, 18 Oct 2019 06:38:23 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F111AABB; Fri, 18 Oct 2019 03:38:00 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0AB873F6C4; Fri, 18 Oct 2019 03:37:59 -0700 (PDT) From: Sudeep Holla To: Viresh Kumar Cc: Sudeep Holla , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, nico@fluxnic.net Subject: [PATCH v3 1/5] cpufreq: scpi: remove stale/outdated comment about the driver Date: Fri, 18 Oct 2019 11:37:45 +0100 Message-Id: <20191018103749.11226-2-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191018103749.11226-1-sudeep.holla@arm.com> References: <20191018103749.11226-1-sudeep.holla@arm.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Commit 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency") removed the arm_big_little dependency from scpi driver and doesn't provide any ops to arm_big_little cpufreq driver. Lets remove that stale comment. Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla --- drivers/cpufreq/scpi-cpufreq.c | 2 -- 1 file changed, 2 deletions(-) -- 2.17.1 diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c index 2b51e0718c9f..20d1f85d5f5a 100644 --- a/drivers/cpufreq/scpi-cpufreq.c +++ b/drivers/cpufreq/scpi-cpufreq.c @@ -1,8 +1,6 @@ /* * System Control and Power Interface (SCPI) based CPUFreq Interface driver * - * It provides necessary ops to arm_big_little cpufreq driver. - * * Copyright (C) 2015 ARM Ltd. * Sudeep Holla * From patchwork Fri Oct 18 10:37:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 176795 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp663296ill; Fri, 18 Oct 2019 03:38:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/dzpsYEoGqRLtjDNG5qXtJ9QZ5qTg6tqDZ+EFFQfO4QRz6neEyc3D35emSKu9x0ZmZ9SF X-Received: by 2002:aa7:c890:: with SMTP id p16mr8761618eds.296.1571395127754; Fri, 18 Oct 2019 03:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571395127; cv=none; d=google.com; s=arc-20160816; b=g8LHzStOxWfCJOAPsSTA5FkvyosbcXCP0/TRXkboUrwT8QuxNaUcWYdcjAjhCIvek6 I0ltZX15tIBY123TSpc91vSiSu7+2UL2CEmET1o2NDVbvme7mJrqV8Z5748CuypcNLQ2 gIDPM+yODvhhJlVhjvReSykRzWO/oUEqtWUPoNy1aMwYMwdujKTsrcAWwZqAQSwf0FLj U5FHrWbbKsFOBwSUxX58DEd/NJY1N8D6eEV71BA4VHeJVQSLYQxnmmqH7KdXtwtw2dVS IdyBJW5Jxut08gsetnSS91C8/sLLB7s5GqqFomN6N7dLjPItE9AHT9VStIcsL00ZSaZN rssw== 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; bh=0UHMH0I62Ahm+zXnBhymDKr5ZpOdBm/uj9Plive8cbI=; b=I9opnNCEZLIYD4LE9oUaCQdQpNjo5c/meR32ZFHPDcU6fhskDMevEqEvevIG6U/tv9 ewW6ZHXsWcsZnCQO+jM4trJjidQJ40PUgyYnoIhFSu5bZiZ2HpnDxZ3HYzdeTfr8xFqF aK1+J0fiXZfFkhy5CfC6B9c4yrCeCf+L17V9h5t9ML/oNXbFT5+Ctc0D8lMXJvR+jzX7 bqogqKrz8hv1f2h4iU2rLrFmF6u7J+qbjn1DYtEAqTquySpLZRo4J8DBst8a/jgHi88i t6vft2moQ15FTNNRjWMfwes7GRmR61W5J/30k+OJl1YfEGWU+Z+4RZ/WIrS+rEzE8HXG ufFQ== 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 x8si3151608ejs.414.2019.10.18.03.38.47; Fri, 18 Oct 2019 03:38:47 -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 S2439167AbfJRKiq (ORCPT + 10 others); Fri, 18 Oct 2019 06:38:46 -0400 Received: from [217.140.110.172] ([217.140.110.172]:34262 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S2439166AbfJRKiq (ORCPT ); Fri, 18 Oct 2019 06:38:46 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 755D3C8F; Fri, 18 Oct 2019 03:38:05 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8CA923F6C4; Fri, 18 Oct 2019 03:38:04 -0700 (PDT) From: Sudeep Holla To: Viresh Kumar Cc: Sudeep Holla , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, nico@fluxnic.net Subject: [PATCH v3 5/5] cpufreq: vexpress-spc: fix some coding style issues Date: Fri, 18 Oct 2019 11:37:49 +0100 Message-Id: <20191018103749.11226-6-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191018103749.11226-1-sudeep.holla@arm.com> References: <20191018103749.11226-1-sudeep.holla@arm.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Fix the following checkpatch checks/warnings: CHECK: Unnecessary parentheses around the code CHECK: Alignment should match open parenthesis CHECK: Prefer kernel type 'u32' over 'uint32_t' WARNING: Missing a blank line after declarations Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla --- drivers/cpufreq/vexpress-spc-cpufreq.c | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) -- 2.17.1 diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c index 132610424747..3259498d7eaa 100644 --- a/drivers/cpufreq/vexpress-spc-cpufreq.c +++ b/drivers/cpufreq/vexpress-spc-cpufreq.c @@ -79,8 +79,8 @@ static unsigned int find_cluster_maxfreq(int cluster) for_each_online_cpu(j) { cpu_freq = per_cpu(cpu_last_req_freq, j); - if ((cluster == per_cpu(physical_cluster, j)) && - (max_freq < cpu_freq)) + if (cluster == per_cpu(physical_cluster, j) && + max_freq < cpu_freq) max_freq = cpu_freq; } @@ -190,13 +190,11 @@ static int ve_spc_cpufreq_set_target(struct cpufreq_policy *policy, freqs_new = freq_table[cur_cluster][index].frequency; if (is_bL_switching_enabled()) { - if ((actual_cluster == A15_CLUSTER) && - (freqs_new < clk_big_min)) { + if (actual_cluster == A15_CLUSTER && freqs_new < clk_big_min) new_cluster = A7_CLUSTER; - } else if ((actual_cluster == A7_CLUSTER) && - (freqs_new > clk_little_max)) { + else if (actual_cluster == A7_CLUSTER && + freqs_new > clk_little_max) new_cluster = A15_CLUSTER; - } } ret = ve_spc_cpufreq_set_rate(cpu, actual_cluster, new_cluster, @@ -224,7 +222,8 @@ static inline u32 get_table_count(struct cpufreq_frequency_table *table) static inline u32 get_table_min(struct cpufreq_frequency_table *table) { struct cpufreq_frequency_table *pos; - uint32_t min_freq = ~0; + u32 min_freq = ~0; + cpufreq_for_each_entry(pos, table) if (pos->frequency < min_freq) min_freq = pos->frequency; @@ -235,7 +234,8 @@ static inline u32 get_table_min(struct cpufreq_frequency_table *table) static inline u32 get_table_max(struct cpufreq_frequency_table *table) { struct cpufreq_frequency_table *pos; - uint32_t max_freq = 0; + u32 max_freq = 0; + cpufreq_for_each_entry(pos, table) if (pos->frequency > max_freq) max_freq = pos->frequency; @@ -259,10 +259,9 @@ static int merge_cluster_tables(void) /* Add in reverse order to get freqs in increasing order */ for (i = MAX_CLUSTERS - 1; i >= 0; i--) { for (j = 0; freq_table[i][j].frequency != CPUFREQ_TABLE_END; - j++) { - table[k].frequency = VIRT_FREQ(i, - freq_table[i][j].frequency); - k++; + j++, k++) { + table[k].frequency = + VIRT_FREQ(i, freq_table[i][j].frequency); } } @@ -335,13 +334,13 @@ static int _get_cluster_clk_and_freq_table(struct device *cpu_dev, return 0; dev_err(cpu_dev, "%s: Failed to get clk for cpu: %d, cluster: %d\n", - __func__, cpu_dev->id, cluster); + __func__, cpu_dev->id, cluster); ret = PTR_ERR(clk[cluster]); dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]); out: dev_err(cpu_dev, "%s: Failed to get data for cluster: %d\n", __func__, - cluster); + cluster); return ret; } @@ -411,7 +410,7 @@ static int ve_spc_cpufreq_init(struct cpufreq_policy *policy) cpu_dev = get_cpu_device(policy->cpu); if (!cpu_dev) { pr_err("%s: failed to get cpu%d device\n", __func__, - policy->cpu); + policy->cpu); return -ENODEV; } @@ -437,7 +436,8 @@ static int ve_spc_cpufreq_init(struct cpufreq_policy *policy) dev_pm_opp_of_register_em(policy->cpus); if (is_bL_switching_enabled()) - per_cpu(cpu_last_req_freq, policy->cpu) = clk_get_cpu_rate(policy->cpu); + per_cpu(cpu_last_req_freq, policy->cpu) = + clk_get_cpu_rate(policy->cpu); dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu); return 0; @@ -456,7 +456,7 @@ static int ve_spc_cpufreq_exit(struct cpufreq_policy *policy) cpu_dev = get_cpu_device(policy->cpu); if (!cpu_dev) { pr_err("%s: failed to get cpu%d device\n", __func__, - policy->cpu); + policy->cpu); return -ENODEV; }