[PATCH -next] cpufreq: cppc: Remove unnecessary INIT_LIST_HEAD()

Subsystems: cpu frequency drivers - cppc cpufreq, cpu frequency scaling framework, the rest

STALE1912d

2 messages, 2 authors, 2021-05-12 · open the first message on its own page

[PATCH -next] cpufreq: cppc: Remove unnecessary INIT_LIST_HEAD()

From: Yang Yingliang <hidden>
Date: 2021-05-11 11:45:13

The list_head cpu_data_list is initialized statically.
It is unnecessary to initialize by INIT_LIST_HEAD().

Reported-by: Hulk Robot <redacted>
Signed-off-by: Yang Yingliang <redacted>
---
 drivers/cpufreq/cppc_cpufreq.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 3848b4c222e1..b312fa210a39 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -723,8 +723,6 @@ static int __init cppc_cpufreq_init(void)
 	if ((acpi_disabled) || !acpi_cpc_valid())
 		return -ENODEV;
 
-	INIT_LIST_HEAD(&cpu_data_list);
-
 	cppc_check_hisi_workaround();
 
 	ret = cpufreq_register_driver(&cppc_cpufreq_driver);
-- 
2.25.1

Re: [PATCH -next] cpufreq: cppc: Remove unnecessary INIT_LIST_HEAD()

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-05-12 05:36:48

On 11-05-21, 19:47, Yang Yingliang wrote:
quoted hunk
The list_head cpu_data_list is initialized statically.
It is unnecessary to initialize by INIT_LIST_HEAD().

Reported-by: Hulk Robot <redacted>
Signed-off-by: Yang Yingliang <redacted>
---
 drivers/cpufreq/cppc_cpufreq.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 3848b4c222e1..b312fa210a39 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -723,8 +723,6 @@ static int __init cppc_cpufreq_init(void)
 	if ((acpi_disabled) || !acpi_cpc_valid())
 		return -ENODEV;
 
-	INIT_LIST_HEAD(&cpu_data_list);
-
 	cppc_check_hisi_workaround();
 
 	ret = cpufreq_register_driver(&cppc_cpufreq_driver);
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help