Skip to content

Commit

Permalink
cpufreq: apple: remove duplicate intializer
Browse files Browse the repository at this point in the history
When -Woverride-init is enabled, gcc notices that the .attr
field is initialized twice:

drivers/cpufreq/apple-soc-cpufreq.c:331:27: error: initialized field overwritten [-Werror=override-init]
  331 |         .attr           = apple_soc_cpufreq_hw_attr,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~

Remove the first one, since this is not actually used.

Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Eric Curtin <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
  • Loading branch information
arndb authored and pull[bot] committed Feb 12, 2023
1 parent 6cf3e3c commit c052c46
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/cpufreq/apple-soc-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ static struct cpufreq_driver apple_soc_cpufreq_driver = {
.flags = CPUFREQ_HAVE_GOVERNOR_PER_POLICY |
CPUFREQ_NEED_INITIAL_FREQ_CHECK | CPUFREQ_IS_COOLING_DEV,
.verify = cpufreq_generic_frequency_table_verify,
.attr = cpufreq_generic_attr,
.get = apple_soc_cpufreq_get_rate,
.init = apple_soc_cpufreq_init,
.exit = apple_soc_cpufreq_exit,
Expand Down

0 comments on commit c052c46

Please sign in to comment.