diff mbox series

[13/13] cpufreq: amd_freq_sensitivity: Remove unused ID structs

Message ID 20200714145049.2496163-14-lee.jones@linaro.org
State New
Headers show
Series Rid W=1 warnings in CPUFreq | expand

Commit Message

Lee Jones July 14, 2020, 2:50 p.m. UTC
Can't see them being used anywhere and the compiler doesn't complain
that they're missing, so ...

Fixes the following W=1 kernel build warning(s):

 drivers/cpufreq/amd_freq_sensitivity.c:147:32: warning: ‘amd_freq_sensitivity_ids’ defined but not used [-Wunused-const-variable=]
 147 | static const struct x86_cpu_id amd_freq_sensitivity_ids[] = {
 | ^~~~~~~~~~~~~~~~~~~~~~~~

Cc: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/cpufreq/amd_freq_sensitivity.c | 6 ------
 1 file changed, 6 deletions(-)

-- 
2.25.1

Comments

Kim Phillips July 14, 2020, 5:15 p.m. UTC | #1
On 7/14/20 9:50 AM, Lee Jones wrote:
> Can't see them being used anywhere and the compiler doesn't complain

> that they're missing, so ...

> 

> Fixes the following W=1 kernel build warning(s):

> 

>  drivers/cpufreq/amd_freq_sensitivity.c:147:32: warning: ‘amd_freq_sensitivity_ids’ defined but not used [-Wunused-const-variable=]

>  147 | static const struct x86_cpu_id amd_freq_sensitivity_ids[] = {

>  | ^~~~~~~~~~~~~~~~~~~~~~~~

> 

> Cc: Jacob Shin <jacob.shin@amd.com>

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> ---


Same comment as for patch 9/13: these are used automatic module loading.

Kim
Lee Jones July 14, 2020, 9:02 p.m. UTC | #2
On Tue, 14 Jul 2020, Kim Phillips wrote:

> On 7/14/20 9:50 AM, Lee Jones wrote:

> > Can't see them being used anywhere and the compiler doesn't complain

> > that they're missing, so ...

> > 

> > Fixes the following W=1 kernel build warning(s):

> > 

> >  drivers/cpufreq/amd_freq_sensitivity.c:147:32: warning: ‘amd_freq_sensitivity_ids’ defined but not used [-Wunused-const-variable=]

> >  147 | static const struct x86_cpu_id amd_freq_sensitivity_ids[] = {

> >  | ^~~~~~~~~~~~~~~~~~~~~~~~

> > 

> > Cc: Jacob Shin <jacob.shin@amd.com>

> > Signed-off-by: Lee Jones <lee.jones@linaro.org>

> > ---

> 

> Same comment as for patch 9/13: these are used automatic module loading.


How does that work?

Could you point me to the code which handles that please?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Kim Phillips July 14, 2020, 9:13 p.m. UTC | #3
On 7/14/20 4:02 PM, Lee Jones wrote:
> On Tue, 14 Jul 2020, Kim Phillips wrote:

>> On 7/14/20 9:50 AM, Lee Jones wrote:

>>> Can't see them being used anywhere and the compiler doesn't complain

>>> that they're missing, so ...

>>>

>>> Fixes the following W=1 kernel build warning(s):

>>>

>>>  drivers/cpufreq/amd_freq_sensitivity.c:147:32: warning: ‘amd_freq_sensitivity_ids’ defined but not used [-Wunused-const-variable=]

>>>  147 | static const struct x86_cpu_id amd_freq_sensitivity_ids[] = {

>>>  | ^~~~~~~~~~~~~~~~~~~~~~~~

>>>

>>> Cc: Jacob Shin <jacob.shin@amd.com>

>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>

>>> ---

>>

>> Same comment as for patch 9/13: these are used automatic module loading.

> 

> How does that work?

> 

> Could you point me to the code which handles that please?


It's MODULE_DEVICE_TABLE magic.

Kim
Lee Jones July 15, 2020, 6:47 a.m. UTC | #4
On Tue, 14 Jul 2020, Kim Phillips wrote:

> On 7/14/20 4:02 PM, Lee Jones wrote:

> > On Tue, 14 Jul 2020, Kim Phillips wrote:

> >> On 7/14/20 9:50 AM, Lee Jones wrote:

> >>> Can't see them being used anywhere and the compiler doesn't complain

> >>> that they're missing, so ...

> >>>

> >>> Fixes the following W=1 kernel build warning(s):

> >>>

> >>>  drivers/cpufreq/amd_freq_sensitivity.c:147:32: warning: ‘amd_freq_sensitivity_ids’ defined but not used [-Wunused-const-variable=]

> >>>  147 | static const struct x86_cpu_id amd_freq_sensitivity_ids[] = {

> >>>  | ^~~~~~~~~~~~~~~~~~~~~~~~

> >>>

> >>> Cc: Jacob Shin <jacob.shin@amd.com>

> >>> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> >>> ---

> >>

> >> Same comment as for patch 9/13: these are used automatic module loading.

> > 

> > How does that work?

> > 

> > Could you point me to the code which handles that please?

> 

> It's MODULE_DEVICE_TABLE magic.


I'll look into that.  Thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
diff mbox series

Patch

diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c
index f7c4206d4c90b..a17093729511b 100644
--- a/drivers/cpufreq/amd_freq_sensitivity.c
+++ b/drivers/cpufreq/amd_freq_sensitivity.c
@@ -144,12 +144,6 @@  static void __exit amd_freq_sensitivity_exit(void)
 }
 module_exit(amd_freq_sensitivity_exit);
 
-static const struct x86_cpu_id amd_freq_sensitivity_ids[] = {
-	X86_MATCH_FEATURE(X86_FEATURE_PROC_FEEDBACK, NULL),
-	{}
-};
-MODULE_DEVICE_TABLE(x86cpu, amd_freq_sensitivity_ids);
-
 MODULE_AUTHOR("Jacob Shin <jacob.shin@amd.com>");
 MODULE_DESCRIPTION("AMD frequency sensitivity feedback powersave bias for "
 		"the ondemand governor.");