提交 63087265 编写于 作者: I Ionela Voinescu 提交者: Rafael J. Wysocki

cppc_cpufreq: fix misspelling, code style and readability issues

Fix a few trivial issues in the cppc_cpufreq driver:

 - indentation of function arguments
 - consistent use of tabs (vs space) in defines
 - spelling: s/Offest/Offset, s/trasition/transition
 - order of local variables, from long pointers to structures to
   short ret and i (index) variables, to improve readability
Signed-off-by: NIonela Voinescu <ionela.voinescu@arm.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 ef7ece9a
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* Minimum struct length needed for the DMI processor entry we want */ /* Minimum struct length needed for the DMI processor entry we want */
#define DMI_ENTRY_PROCESSOR_MIN_LENGTH 48 #define DMI_ENTRY_PROCESSOR_MIN_LENGTH 48
/* Offest in the DMI processor structure for the max frequency */ /* Offset in the DMI processor structure for the max frequency */
#define DMI_PROCESSOR_MAX_SPEED 0x14 #define DMI_PROCESSOR_MAX_SPEED 0x14
/* /*
...@@ -99,8 +99,8 @@ static u64 cppc_get_dmi_max_khz(void) ...@@ -99,8 +99,8 @@ static u64 cppc_get_dmi_max_khz(void)
static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu, static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,
unsigned int perf) unsigned int perf)
{ {
static u64 max_khz;
struct cppc_perf_caps *caps = &cpu->perf_caps; struct cppc_perf_caps *caps = &cpu->perf_caps;
static u64 max_khz;
u64 mul, div; u64 mul, div;
if (caps->lowest_freq && caps->nominal_freq) { if (caps->lowest_freq && caps->nominal_freq) {
...@@ -123,8 +123,8 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu, ...@@ -123,8 +123,8 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,
static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu, static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu,
unsigned int freq) unsigned int freq)
{ {
static u64 max_khz;
struct cppc_perf_caps *caps = &cpu->perf_caps; struct cppc_perf_caps *caps = &cpu->perf_caps;
static u64 max_khz;
u64 mul, div; u64 mul, div;
if (caps->lowest_freq && caps->nominal_freq) { if (caps->lowest_freq && caps->nominal_freq) {
...@@ -149,8 +149,8 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy, ...@@ -149,8 +149,8 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int target_freq,
unsigned int relation) unsigned int relation)
{ {
struct cppc_cpudata *cpu;
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
struct cppc_cpudata *cpu;
u32 desired_perf; u32 desired_perf;
int ret = 0; int ret = 0;
...@@ -199,7 +199,7 @@ static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy) ...@@ -199,7 +199,7 @@ static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy)
/* /*
* The PCC subspace describes the rate at which platform can accept commands * The PCC subspace describes the rate at which platform can accept commands
* on the shared PCC channel (including READs which do not count towards freq * on the shared PCC channel (including READs which do not count towards freq
* trasition requests), so ideally we need to use the PCC values as a fallback * transition requests), so ideally we need to use the PCC values as a fallback
* if we don't have a platform specific transition_delay_us * if we don't have a platform specific transition_delay_us
*/ */
#ifdef CONFIG_ARM64 #ifdef CONFIG_ARM64
...@@ -241,8 +241,8 @@ static unsigned int cppc_cpufreq_get_transition_delay_us(int cpu) ...@@ -241,8 +241,8 @@ static unsigned int cppc_cpufreq_get_transition_delay_us(int cpu)
static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
{ {
struct cppc_cpudata *cpu;
unsigned int cpu_num = policy->cpu; unsigned int cpu_num = policy->cpu;
struct cppc_cpudata *cpu;
int ret = 0; int ret = 0;
cpu = all_cpu_data[policy->cpu]; cpu = all_cpu_data[policy->cpu];
...@@ -450,8 +450,8 @@ static void cppc_check_hisi_workaround(void) ...@@ -450,8 +450,8 @@ static void cppc_check_hisi_workaround(void)
static int __init cppc_cpufreq_init(void) static int __init cppc_cpufreq_init(void)
{ {
int i, ret = 0;
struct cppc_cpudata *cpu; struct cppc_cpudata *cpu;
int i, ret = 0;
if (acpi_disabled) if (acpi_disabled)
return -ENODEV; return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册