* [PATCH v2 00/13] Rid W=1 warnings in CPUFreq
@ 2020-07-15 8:26 Lee Jones
2020-07-15 8:26 ` [PATCH v2 01/13] cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
` (14 more replies)
0 siblings, 15 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar; +Cc: Lee Jones, linux-kernel, linux-arm-kernel, linux-pm
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.
After these patches are applied, the build system no longer
complains about any W=0 nor W=1 level warnings in drivers/cpufreq.
Hurrah!
Changelog
v1 => v2:
- Collect *-bys
- Use __maybe_unused instead of removing device IDs
- Use __always_unused instead of using unused variables
- Include architecture header instead of creating new include file
Lee Jones (13):
cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard
comment blocks
cpufreq: cpufreq: Demote lots of function headers unworthy of
kerneldoc status
cpufreq: cpufreq_governor: Demote store_sampling_rate() header to
standard comment block
cpufreq: sti-cpufreq: Fix some formatting and misspelling issues
cpufreq: pasemi: Include header file for {check,restore}_astate
prototypes
cpufreq: powernv-cpufreq: Functions only used in call-backs should be
static
cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues
cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused
cpufreq: acpi-cpufreq: Mark sometimes used ID structs as
__maybe_unused
cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as
__always_unused
cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused
cpufreq: intel_pstate: Supply struct attribute description for
get_aperf_mperf_shift()
cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as
__maybe_unused
drivers/cpufreq/acpi-cpufreq.c | 8 +++----
drivers/cpufreq/amd_freq_sensitivity.c | 2 +-
drivers/cpufreq/cpufreq.c | 32 ++++++++++++++------------
drivers/cpufreq/cpufreq_governor.c | 2 +-
drivers/cpufreq/freq_table.c | 6 ++---
drivers/cpufreq/intel_pstate.c | 2 ++
drivers/cpufreq/pasemi-cpufreq.c | 2 ++
drivers/cpufreq/pcc-cpufreq.c | 2 +-
drivers/cpufreq/powernow-k8.c | 4 ++--
drivers/cpufreq/powernv-cpufreq.c | 15 ++++++------
drivers/cpufreq/sti-cpufreq.c | 8 +++----
11 files changed, 45 insertions(+), 38 deletions(-)
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 01/13] cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard comment blocks
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 02/13] cpufreq: cpufreq: Demote lots of function headers unworthy of kerneldoc status Lee Jones
` (13 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: Dominik Brodowski, Lee Jones, linux-kernel, linux-arm-kernel, linux-pm
No attempt has been made to document any of the demoted functions here.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/freq_table.c:229: warning: Function parameter or member 'policy' not described in 'show_available_freqs'
drivers/cpufreq/freq_table.c:229: warning: Function parameter or member 'buf' not described in 'show_available_freqs'
drivers/cpufreq/freq_table.c:229: warning: Function parameter or member 'show_boost' not described in 'show_available_freqs'
drivers/cpufreq/freq_table.c:269: warning: Function parameter or member 'policy' not described in 'scaling_available_frequencies_show'
drivers/cpufreq/freq_table.c:269: warning: Function parameter or member 'buf' not described in 'scaling_available_frequencies_show'
drivers/cpufreq/freq_table.c:281: warning: Function parameter or member 'policy' not described in 'scaling_boost_frequencies_show'
drivers/cpufreq/freq_table.c:281: warning: Function parameter or member 'buf' not described in 'scaling_boost_frequencies_show'
Cc: Dominik Brodowski <linux@brodo.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/freq_table.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
index e117b0059123e..f839dc9852c08 100644
--- a/drivers/cpufreq/freq_table.c
+++ b/drivers/cpufreq/freq_table.c
@@ -221,7 +221,7 @@ int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy,
}
EXPORT_SYMBOL_GPL(cpufreq_frequency_table_get_index);
-/**
+/*
* show_available_freqs - show available frequencies for the specified CPU
*/
static ssize_t show_available_freqs(struct cpufreq_policy *policy, char *buf,
@@ -260,7 +260,7 @@ static ssize_t show_available_freqs(struct cpufreq_policy *policy, char *buf,
struct freq_attr cpufreq_freq_attr_##_name##_freqs = \
__ATTR_RO(_name##_frequencies)
-/**
+/*
* show_scaling_available_frequencies - show available normal frequencies for
* the specified CPU
*/
@@ -272,7 +272,7 @@ static ssize_t scaling_available_frequencies_show(struct cpufreq_policy *policy,
cpufreq_attr_available_freq(scaling_available);
EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs);
-/**
+/*
* show_available_boost_freqs - show available boost frequencies for
* the specified CPU
*/
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 02/13] cpufreq: cpufreq: Demote lots of function headers unworthy of kerneldoc status
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
2020-07-15 8:26 ` [PATCH v2 01/13] cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 03/13] cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block Lee Jones
` (12 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: Ashok Raj, linux-pm, Jacob Shin, linux-kernel, Lee Jones,
linux-arm-kernel, Dominik Brodowski
Also provide missing function parameter description for 'cpu' and 'policy'.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/cpufreq.c:60: warning: cannot understand function prototype: 'struct cpufreq_driver *cpufreq_driver; '
drivers/cpufreq/cpufreq.c:90: warning: Function parameter or member 'cpufreq_policy_notifier_list' not described in 'BLOCKING_NOTIFIER_HEAD'
drivers/cpufreq/cpufreq.c:312: warning: Function parameter or member 'val' not described in 'adjust_jiffies'
drivers/cpufreq/cpufreq.c:312: warning: Function parameter or member 'ci' not described in 'adjust_jiffies'
drivers/cpufreq/cpufreq.c:538: warning: Function parameter or member 'policy' not described in 'cpufreq_driver_resolve_freq'
drivers/cpufreq/cpufreq.c:686: warning: Function parameter or member 'file_name' not described in 'show_one'
drivers/cpufreq/cpufreq.c:686: warning: Function parameter or member 'object' not described in 'show_one'
drivers/cpufreq/cpufreq.c:731: warning: Function parameter or member 'file_name' not described in 'store_one'
drivers/cpufreq/cpufreq.c:731: warning: Function parameter or member 'object' not described in 'store_one'
drivers/cpufreq/cpufreq.c:741: warning: Function parameter or member 'policy' not described in 'show_cpuinfo_cur_freq'
drivers/cpufreq/cpufreq.c:741: warning: Function parameter or member 'buf' not described in 'show_cpuinfo_cur_freq'
drivers/cpufreq/cpufreq.c:754: warning: Function parameter or member 'policy' not described in 'show_scaling_governor'
drivers/cpufreq/cpufreq.c:754: warning: Function parameter or member 'buf' not described in 'show_scaling_governor'
drivers/cpufreq/cpufreq.c:770: warning: Function parameter or member 'policy' not described in 'store_scaling_governor'
drivers/cpufreq/cpufreq.c:770: warning: Function parameter or member 'buf' not described in 'store_scaling_governor'
drivers/cpufreq/cpufreq.c:770: warning: Function parameter or member 'count' not described in 'store_scaling_governor'
drivers/cpufreq/cpufreq.c:806: warning: Function parameter or member 'policy' not described in 'show_scaling_driver'
drivers/cpufreq/cpufreq.c:806: warning: Function parameter or member 'buf' not described in 'show_scaling_driver'
drivers/cpufreq/cpufreq.c:815: warning: Function parameter or member 'policy' not described in 'show_scaling_available_governors'
drivers/cpufreq/cpufreq.c:815: warning: Function parameter or member 'buf' not described in 'show_scaling_available_governors'
drivers/cpufreq/cpufreq.c:859: warning: Function parameter or member 'policy' not described in 'show_related_cpus'
drivers/cpufreq/cpufreq.c:859: warning: Function parameter or member 'buf' not described in 'show_related_cpus'
drivers/cpufreq/cpufreq.c:867: warning: Function parameter or member 'policy' not described in 'show_affected_cpus'
drivers/cpufreq/cpufreq.c:867: warning: Function parameter or member 'buf' not described in 'show_affected_cpus'
drivers/cpufreq/cpufreq.c:901: warning: Function parameter or member 'policy' not described in 'show_bios_limit'
drivers/cpufreq/cpufreq.c:901: warning: Function parameter or member 'buf' not described in 'show_bios_limit'
drivers/cpufreq/cpufreq.c:1625: warning: Function parameter or member 'dev' not described in 'cpufreq_remove_dev'
drivers/cpufreq/cpufreq.c:1625: warning: Function parameter or member 'sif' not described in 'cpufreq_remove_dev'
drivers/cpufreq/cpufreq.c:2380: warning: Function parameter or member 'cpu' not described in 'cpufreq_get_policy'
drivers/cpufreq/cpufreq.c:2771: warning: Function parameter or member 'driver' not described in 'cpufreq_unregister_driver'
Cc: Dominik Brodowski <linux@brodo.de>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/cpufreq.c | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 036f4cc42ede2..17c1c3becd925 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -52,7 +52,7 @@ static LIST_HEAD(cpufreq_governor_list);
static char default_governor[CPUFREQ_NAME_LEN];
-/**
+/*
* The "cpufreq driver" - the arch- or hardware-dependent low
* level driver of CPUFreq support, and its spinlock. This lock
* also protects the cpufreq_cpu_data array.
@@ -80,7 +80,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
struct cpufreq_governor *new_gov,
unsigned int new_pol);
-/**
+/*
* Two notifier lists: the "policy" list is involved in the
* validation process for a new CPU frequency policy; the
* "transition" list for kernel code that needs to handle
@@ -300,7 +300,7 @@ struct cpufreq_policy *cpufreq_cpu_acquire(unsigned int cpu)
* EXTERNALLY AFFECTING FREQUENCY CHANGES *
*********************************************************************/
-/**
+/*
* adjust_jiffies - adjust the system "loops_per_jiffy"
*
* This function alters the system "loops_per_jiffy" for the clock
@@ -526,6 +526,7 @@ EXPORT_SYMBOL_GPL(cpufreq_disable_fast_switch);
/**
* cpufreq_driver_resolve_freq - Map a target frequency to a driver-supported
* one.
+ * @policy: associated policy to interrogate
* @target_freq: target frequency to resolve.
*
* The target to driver frequency mapping is cached in the policy.
@@ -670,7 +671,7 @@ static struct cpufreq_governor *cpufreq_parse_governor(char *str_governor)
return get_governor(str_governor);
}
-/**
+/*
* cpufreq_per_cpu_attr_read() / show_##file_name() -
* print out cpufreq information
*
@@ -712,7 +713,7 @@ static ssize_t show_scaling_cur_freq(struct cpufreq_policy *policy, char *buf)
return ret;
}
-/**
+/*
* cpufreq_per_cpu_attr_write() / store_##file_name() - sysfs write access
*/
#define store_one(file_name, object) \
@@ -733,7 +734,7 @@ static ssize_t store_##file_name \
store_one(scaling_min_freq, min);
store_one(scaling_max_freq, max);
-/**
+/*
* show_cpuinfo_cur_freq - current CPU frequency as detected by hardware
*/
static ssize_t show_cpuinfo_cur_freq(struct cpufreq_policy *policy,
@@ -747,7 +748,7 @@ static ssize_t show_cpuinfo_cur_freq(struct cpufreq_policy *policy,
return sprintf(buf, "<unknown>\n");
}
-/**
+/*
* show_scaling_governor - show the current policy for the specified CPU
*/
static ssize_t show_scaling_governor(struct cpufreq_policy *policy, char *buf)
@@ -762,7 +763,7 @@ static ssize_t show_scaling_governor(struct cpufreq_policy *policy, char *buf)
return -EINVAL;
}
-/**
+/*
* store_scaling_governor - store policy for the specified CPU
*/
static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
@@ -799,7 +800,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
return ret ? ret : count;
}
-/**
+/*
* show_scaling_driver - show the cpufreq driver currently loaded
*/
static ssize_t show_scaling_driver(struct cpufreq_policy *policy, char *buf)
@@ -807,7 +808,7 @@ static ssize_t show_scaling_driver(struct cpufreq_policy *policy, char *buf)
return scnprintf(buf, CPUFREQ_NAME_PLEN, "%s\n", cpufreq_driver->name);
}
-/**
+/*
* show_scaling_available_governors - show the available CPUfreq governors
*/
static ssize_t show_scaling_available_governors(struct cpufreq_policy *policy,
@@ -851,7 +852,7 @@ ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf)
}
EXPORT_SYMBOL_GPL(cpufreq_show_cpus);
-/**
+/*
* show_related_cpus - show the CPUs affected by each transition even if
* hw coordination is in use
*/
@@ -860,7 +861,7 @@ static ssize_t show_related_cpus(struct cpufreq_policy *policy, char *buf)
return cpufreq_show_cpus(policy->related_cpus, buf);
}
-/**
+/*
* show_affected_cpus - show the CPUs affected by each transition
*/
static ssize_t show_affected_cpus(struct cpufreq_policy *policy, char *buf)
@@ -894,7 +895,7 @@ static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf)
return policy->governor->show_setspeed(policy, buf);
}
-/**
+/*
* show_bios_limit - show the current cpufreq HW/BIOS limitation
*/
static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf)
@@ -1616,7 +1617,7 @@ static int cpufreq_offline(unsigned int cpu)
return 0;
}
-/**
+/*
* cpufreq_remove_dev - remove a CPU device
*
* Removes the cpufreq interface for a CPU device.
@@ -2373,6 +2374,7 @@ EXPORT_SYMBOL_GPL(cpufreq_unregister_governor);
* cpufreq_get_policy - get the current cpufreq_policy
* @policy: struct cpufreq_policy into which the current cpufreq_policy
* is written
+ * @cpu: CPU to find the policy for
*
* Reads the current cpufreq policy.
*/
@@ -2759,7 +2761,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
}
EXPORT_SYMBOL_GPL(cpufreq_register_driver);
-/**
+/*
* cpufreq_unregister_driver - unregister the current CPUFreq driver
*
* Unregister the current CPUFreq driver. Only call this if you have
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 03/13] cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
2020-07-15 8:26 ` [PATCH v2 01/13] cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-15 8:26 ` [PATCH v2 02/13] cpufreq: cpufreq: Demote lots of function headers unworthy of kerneldoc status Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 04/13] cpufreq: sti-cpufreq: Fix some formatting and misspelling issues Lee Jones
` (11 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: Alexander Clouter, linux-pm, linux-kernel, Jun Nakajima,
Venkatesh Pallipadi, Lee Jones, linux-arm-kernel
There is no need for this to be denoted as kerneldoc.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/cpufreq_governor.c:46: warning: Function parameter or member 'attr_set' not described in 'store_sampling_rate'
drivers/cpufreq/cpufreq_governor.c:46: warning: Function parameter or member 'buf' not described in 'store_sampling_rate'
drivers/cpufreq/cpufreq_governor.c:46: warning: Function parameter or member 'count' not described in 'store_sampling_rate'
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/cpufreq_governor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index f99ae45efaea7..63f7c219062b9 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -26,7 +26,7 @@ static DEFINE_PER_CPU(struct cpu_dbs_info, cpu_dbs);
static DEFINE_MUTEX(gov_dbs_data_mutex);
/* Common sysfs tunables */
-/**
+/*
* store_sampling_rate - update sampling rate effective immediately if needed.
*
* If new rate is smaller than the old, simply updating
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 04/13] cpufreq: sti-cpufreq: Fix some formatting and misspelling issues
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (2 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 03/13] cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 9:46 ` Viresh Kumar
2020-07-15 8:26 ` [PATCH v2 05/13] cpufreq: pasemi: Include header file for {check, restore}_astate prototypes Lee Jones
` (10 subsequent siblings)
14 siblings, 1 reply; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, Lee Jones, Patrice Chotard, linux-kernel, Pal Singh,
linux-arm-kernel
Kerneldoc format for attribute descriptions should be '@.*: '.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/sti-cpufreq.c:49: warning: cannot understand function prototype: 'struct sti_cpufreq_ddata '
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Pal Singh <ajitpal.singh@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/sti-cpufreq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
index 8f16bbb164b84..a5ad96d29adca 100644
--- a/drivers/cpufreq/sti-cpufreq.c
+++ b/drivers/cpufreq/sti-cpufreq.c
@@ -40,11 +40,11 @@ enum {
};
/**
- * ST CPUFreq Driver Data
+ * struct sti_cpufreq_ddata - ST CPUFreq Driver Data
*
- * @cpu_node CPU's OF node
- * @syscfg_eng Engineering Syscon register map
- * @regmap Syscon register map
+ * @cpu: CPU's OF node
+ * @syscfg_eng: Engineering Syscon register map
+ * @syscfg: Syscon register map
*/
static struct sti_cpufreq_ddata {
struct device *cpu;
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 05/13] cpufreq: pasemi: Include header file for {check, restore}_astate prototypes
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (3 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 04/13] cpufreq: sti-cpufreq: Fix some formatting and misspelling issues Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static Lee Jones
` (9 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, Michael Ellerman, linuxppc-dev, linux-kernel,
Paul Mackerras, Benjamin Herrenschmidt, Olof Johansson,
Lee Jones, linux-arm-kernel
If function callers and providers do not share the same prototypes the
compiler complains of missing prototypes. Fix this by including the
correct platforms header file.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/pasemi-cpufreq.c:109:5: warning: no previous prototype for ‘check_astate’ [-Wmissing-prototypes]
109 | int check_astate(void)
| ^~~~~~~~~~~~
drivers/cpufreq/pasemi-cpufreq.c:114:6: warning: no previous prototype for ‘restore_astate’ [-Wmissing-prototypes]
114 | void restore_astate(int cpu)
| ^~~~~~~~~~~~~~
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Suggested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/pasemi-cpufreq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c
index c66f566a854cb..815645170c4de 100644
--- a/drivers/cpufreq/pasemi-cpufreq.c
+++ b/drivers/cpufreq/pasemi-cpufreq.c
@@ -22,6 +22,8 @@
#include <asm/time.h>
#include <asm/smp.h>
+#include <platforms/pasemi/pasemi.h>
+
#define SDCASR_REG 0x0100
#define SDCASR_REG_STRIDE 0x1000
#define SDCPWR_CFGA0_REG 0x0100
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (4 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 05/13] cpufreq: pasemi: Include header file for {check, restore}_astate prototypes Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 9:45 ` Viresh Kumar
2020-07-15 8:26 ` [PATCH v2 07/13] cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues Lee Jones
` (8 subsequent siblings)
14 siblings, 1 reply; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, Michael Ellerman, linuxppc-dev, linux-kernel,
Paul Mackerras, Benjamin Herrenschmidt, Lee Jones,
linux-arm-kernel
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/powernv-cpufreq.c:669:6: warning: no previous prototype for ‘gpstate_timer_handler’ [-Wmissing-prototypes]
drivers/cpufreq/powernv-cpufreq.c:902:6: warning: no previous prototype for ‘powernv_cpufreq_work_fn’ [-Wmissing-prototypes]
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/powernv-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 8646eb197cd96..068cc53abe320 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -666,7 +666,7 @@ static inline void queue_gpstate_timer(struct global_pstate_info *gpstates)
* according quadratic equation. Queues a new timer if it is still not equal
* to local pstate
*/
-void gpstate_timer_handler(struct timer_list *t)
+static void gpstate_timer_handler(struct timer_list *t)
{
struct global_pstate_info *gpstates = from_timer(gpstates, t, timer);
struct cpufreq_policy *policy = gpstates->policy;
@@ -899,7 +899,7 @@ static struct notifier_block powernv_cpufreq_reboot_nb = {
.notifier_call = powernv_cpufreq_reboot_notifier,
};
-void powernv_cpufreq_work_fn(struct work_struct *work)
+static void powernv_cpufreq_work_fn(struct work_struct *work)
{
struct chip *chip = container_of(work, struct chip, throttle);
struct cpufreq_policy *policy;
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 07/13] cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (5 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 08/13] cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused Lee Jones
` (7 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, Michael Ellerman, linuxppc-dev, linux-kernel,
Paul Mackerras, Benjamin Herrenschmidt, Lee Jones,
linux-arm-kernel
Repair problems with formatting and missing attributes/parameters, and
demote header comments which do not meet the required standards
applicable to kerneldoc.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/powernv-cpufreq.c:84: warning: Function parameter or member 'last_lpstate_idx' not described in 'global_pstate_info'
drivers/cpufreq/powernv-cpufreq.c:84: warning: Function parameter or member 'last_gpstate_idx' not described in 'global_pstate_info'
drivers/cpufreq/powernv-cpufreq.c:84: warning: Function parameter or member 'policy' not described in 'global_pstate_info'
drivers/cpufreq/powernv-cpufreq.c:182: warning: Function parameter or member 'i' not described in 'idx_to_pstate'
drivers/cpufreq/powernv-cpufreq.c:201: warning: Function parameter or member 'pstate' not described in 'pstate_to_idx'
drivers/cpufreq/powernv-cpufreq.c:670: warning: Function parameter or member 't' not described in 'gpstate_timer_handler'
drivers/cpufreq/powernv-cpufreq.c:670: warning: Excess function parameter 'data' description in 'gpstate_timer_handler'
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/powernv-cpufreq.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 068cc53abe320..2e5a8b8a4abaa 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -64,13 +64,14 @@
* highest_lpstate_idx
* @last_sampled_time: Time from boot in ms when global pstates were
* last set
- * @last_lpstate_idx, Last set value of local pstate and global
- * last_gpstate_idx pstate in terms of cpufreq table index
+ * @last_lpstate_idx: Last set value of local pstate and global
+ * @last_gpstate_idx: pstate in terms of cpufreq table index
* @timer: Is used for ramping down if cpu goes idle for
* a long time with global pstate held high
* @gpstate_lock: A spinlock to maintain synchronization between
* routines called by the timer handler and
* governer's target_index calls
+ * @policy: Associated CPUFreq policy
*/
struct global_pstate_info {
int highest_lpstate_idx;
@@ -170,7 +171,7 @@ static inline u8 extract_pstate(u64 pmsr_val, unsigned int shift)
/* Use following functions for conversions between pstate_id and index */
-/**
+/*
* idx_to_pstate : Returns the pstate id corresponding to the
* frequency in the cpufreq frequency table
* powernv_freqs indexed by @i.
@@ -188,7 +189,7 @@ static inline u8 idx_to_pstate(unsigned int i)
return powernv_freqs[i].driver_data;
}
-/**
+/*
* pstate_to_idx : Returns the index in the cpufreq frequencytable
* powernv_freqs for the frequency whose corresponding
* pstate id is @pstate.
@@ -660,7 +661,7 @@ static inline void queue_gpstate_timer(struct global_pstate_info *gpstates)
/**
* gpstate_timer_handler
*
- * @data: pointer to cpufreq_policy on which timer was queued
+ * @t: Timer context used to fetch global pstate info struct
*
* This handler brings down the global pstate closer to the local pstate
* according quadratic equation. Queues a new timer if it is still not equal
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 08/13] cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (6 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 07/13] cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 09/13] cpufreq: acpi-cpufreq: Mark sometimes used ID structs as __maybe_unused Lee Jones
` (6 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: Denis Sadykov, Andy Grover, linux-pm, linux-kernel,
Paul Diefenbaugh, Lee Jones, linux-arm-kernel, Dominik Brodowski
If we fail to use a variable, even a 'dummy' one, then the compiler
complains that it is set but not used. We know this is fine, so we
set it as __always_unused to let the compiler know.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/acpi-cpufreq.c: In function ‘cpu_freq_read_intel’:
drivers/cpufreq/acpi-cpufreq.c:247:11: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
drivers/cpufreq/acpi-cpufreq.c: In function ‘cpu_freq_read_amd’:
drivers/cpufreq/acpi-cpufreq.c:265:11: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
Cc: Andy Grover <andrew.grover@intel.com>
Cc: Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
Cc: Dominik Brodowski <linux@brodo.de>
Cc: Denis Sadykov <denis.m.sadykov@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/acpi-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 429e5a36c08a9..6b3d8355c8dea 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -244,7 +244,7 @@ static unsigned extract_freq(struct cpufreq_policy *policy, u32 val)
static u32 cpu_freq_read_intel(struct acpi_pct_register *not_used)
{
- u32 val, dummy;
+ u32 val, dummy __always_unused;
rdmsr(MSR_IA32_PERF_CTL, val, dummy);
return val;
@@ -261,7 +261,7 @@ static void cpu_freq_write_intel(struct acpi_pct_register *not_used, u32 val)
static u32 cpu_freq_read_amd(struct acpi_pct_register *not_used)
{
- u32 val, dummy;
+ u32 val, dummy __always_unused;
rdmsr(MSR_AMD_PERF_CTL, val, dummy);
return val;
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 09/13] cpufreq: acpi-cpufreq: Mark sometimes used ID structs as __maybe_unused
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (7 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 08/13] cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused Lee Jones
` (5 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: Denis Sadykov, Andy Grover, linux-pm, linux-kernel,
Paul Diefenbaugh, Lee Jones, linux-arm-kernel, Dominik Brodowski
Not used when MODULE is not defined.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/acpi-cpufreq.c:1004:36: warning: ‘processor_device_ids’ defined but not used [-Wunused-const-variable=]
997 | static const struct x86_cpu_id acpi_cpufreq_ids[] = {
| ^~~~~~~~~~~~~~~~
drivers/cpufreq/acpi-cpufreq.c:997:32: warning: ‘acpi_cpufreq_ids’ defined but not used [-Wunused-const-variable=]
619 | static const struct acpi_device_id processor_device_ids[] = {
| ^~~~~~~~~~~~~~~~~~~~
Cc: Andy Grover <andrew.grover@intel.com>
Cc: Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
Cc: Dominik Brodowski <linux@brodo.de>
Cc: Denis Sadykov <denis.m.sadykov@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/acpi-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 6b3d8355c8dea..65bdedcc7f142 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -993,14 +993,14 @@ MODULE_PARM_DESC(acpi_pstate_strict,
late_initcall(acpi_cpufreq_init);
module_exit(acpi_cpufreq_exit);
-static const struct x86_cpu_id acpi_cpufreq_ids[] = {
+static const struct x86_cpu_id __maybe_unused acpi_cpufreq_ids[] = {
X86_MATCH_FEATURE(X86_FEATURE_ACPI, NULL),
X86_MATCH_FEATURE(X86_FEATURE_HW_PSTATE, NULL),
{}
};
MODULE_DEVICE_TABLE(x86cpu, acpi_cpufreq_ids);
-static const struct acpi_device_id processor_device_ids[] = {
+static const struct acpi_device_id __maybe_unused processor_device_ids[] = {
{ACPI_PROCESSOR_OBJECT_HID, },
{ACPI_PROCESSOR_DEVICE_HID, },
{},
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (8 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 09/13] cpufreq: acpi-cpufreq: Mark sometimes used ID structs as __maybe_unused Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-22 12:50 ` Pavel Machek
2020-07-15 8:26 ` [PATCH v2 11/13] cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused Lee Jones
` (4 subsequent siblings)
14 siblings, 1 reply; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, Paul Devriendt, Andreas Herrmann, linux-kernel,
Mark Langsdorf, Pavel Machek, Lee Jones, linux-arm-kernel,
Dominik Brodowski
if we fail to use a variable, even a dummy ones, then the compiler
complains that it is set but not used. We know this is fine, so we
set them as __always_unused here to let the compiler know.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/powernow-k8.c: In function ‘pending_bit_stuck’:
drivers/cpufreq/powernow-k8.c:89:10: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable]
89 | u32 lo, hi;
| ^~
drivers/cpufreq/powernow-k8.c: In function ‘core_voltage_pre_transition’:
drivers/cpufreq/powernow-k8.c:285:14: warning: variable ‘lo’ set but not used [-Wunused-but-set-variable]
285 | u32 maxvid, lo, rvomult = 1;
| ^~
Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
Cc: Dominik Brodowski <linux@brodo.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Paul Devriendt <paul.devriendt@amd.com>
Cc: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/powernow-k8.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index 3984959eed1d5..0acc9e241cd7d 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -86,7 +86,7 @@ static u32 convert_fid_to_vco_fid(u32 fid)
*/
static int pending_bit_stuck(void)
{
- u32 lo, hi;
+ u32 lo, hi __always_unused;
rdmsr(MSR_FIDVID_STATUS, lo, hi);
return lo & MSR_S_LO_CHANGE_PENDING ? 1 : 0;
@@ -282,7 +282,7 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data,
{
u32 rvosteps = data->rvo;
u32 savefid = data->currfid;
- u32 maxvid, lo, rvomult = 1;
+ u32 maxvid, lo __always_unused, rvomult = 1;
pr_debug("ph1 (cpu%d): start, currfid 0x%x, currvid 0x%x, reqvid 0x%x, rvo 0x%x\n",
smp_processor_id(),
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 11/13] cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (9 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 12/13] cpufreq: intel_pstate: Supply struct attribute description for get_aperf_mperf_shift() Lee Jones
` (3 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, linux-kernel, Nagananda Chumbalkar, Lee Jones,
linux-arm-kernel, Matthew Garrett
Not used when MODULE is not defined.
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/pcc-cpufreq.c:619:36: warning: ‘processor_device_ids’ defined but not used [-Wunused-const-variable=]
619 | static const struct acpi_device_id processor_device_ids[] = {
| ^~~~~~~~~~~~~~~~~~~~
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Nagananda Chumbalkar <nagananda.chumbalkar@hp.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/pcc-cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 5789fe7a94bd3..9f3fc7a073d07 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -616,7 +616,7 @@ static void __exit pcc_cpufreq_exit(void)
free_percpu(pcc_cpu_info);
}
-static const struct acpi_device_id processor_device_ids[] = {
+static const struct acpi_device_id __maybe_unused processor_device_ids[] = {
{ACPI_PROCESSOR_OBJECT_HID, },
{ACPI_PROCESSOR_DEVICE_HID, },
{},
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 12/13] cpufreq: intel_pstate: Supply struct attribute description for get_aperf_mperf_shift()
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (10 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 11/13] cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 13/13] cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as __maybe_unused Lee Jones
` (2 subsequent siblings)
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: linux-pm, Dirk Brandewie, Rafael J. Wysocki, linux-kernel,
Srinivas Pandruvada, Lee Jones, linux-arm-kernel, Len Brown
Fixes the following W=1 kernel build warning(s):
drivers/cpufreq/intel_pstate.c:293: warning: Function parameter or member 'get_aperf_mperf_shift' not described in 'pstate_funcs'
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Dirk Brandewie <dirk.j.brandewie@intel.com>
Suggested-by: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/cpufreq/intel_pstate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 44c7b4677675d..3960f971fdfb3 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -275,6 +275,8 @@ static struct cpudata **all_cpu_data;
* @get_min: Callback to get minimum P state
* @get_turbo: Callback to get turbo P state
* @get_scaling: Callback to get frequency scaling factor
+ * @get_aperf_mperf_shift: Callback to get the APERF vs MPERF frequency
+ * difference
* @get_val: Callback to convert P state to actual MSR write value
* @get_vid: Callback to get VID data for Atom platforms
*
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 13/13] cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as __maybe_unused
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (11 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 12/13] cpufreq: intel_pstate: Supply struct attribute description for get_aperf_mperf_shift() Lee Jones
@ 2020-07-15 8:26 ` Lee Jones
2020-07-15 9:46 ` [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Viresh Kumar
2020-07-15 13:23 ` Rafael J. Wysocki
14 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 8:26 UTC (permalink / raw)
To: rjw, viresh.kumar
Cc: Jacob Shin, Lee Jones, linux-kernel, linux-arm-kernel, linux-pm
ot used when MODULE is not defined.
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c
index f7c4206d4c90b..d0b10baf039ab 100644
--- a/drivers/cpufreq/amd_freq_sensitivity.c
+++ b/drivers/cpufreq/amd_freq_sensitivity.c
@@ -144,7 +144,7 @@ static void __exit amd_freq_sensitivity_exit(void)
}
module_exit(amd_freq_sensitivity_exit);
-static const struct x86_cpu_id amd_freq_sensitivity_ids[] = {
+static const struct x86_cpu_id __maybe_unused amd_freq_sensitivity_ids[] = {
X86_MATCH_FEATURE(X86_FEATURE_PROC_FEEDBACK, NULL),
{}
};
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static
2020-07-15 8:26 ` [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static Lee Jones
@ 2020-07-15 9:45 ` Viresh Kumar
2020-07-15 10:13 ` Lee Jones
0 siblings, 1 reply; 20+ messages in thread
From: Viresh Kumar @ 2020-07-15 9:45 UTC (permalink / raw)
To: Lee Jones
Cc: linux-pm, Michael Ellerman, rjw, linux-kernel, Paul Mackerras,
Benjamin Herrenschmidt, linuxppc-dev, linux-arm-kernel
On 15-07-20, 09:26, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/cpufreq/powernv-cpufreq.c:669:6: warning: no previous prototype for ‘gpstate_timer_handler’ [-Wmissing-prototypes]
> drivers/cpufreq/powernv-cpufreq.c:902:6: warning: no previous prototype for ‘powernv_cpufreq_work_fn’ [-Wmissing-prototypes]
>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/powernv-cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> index 8646eb197cd96..068cc53abe320 100644
> --- a/drivers/cpufreq/powernv-cpufreq.c
> +++ b/drivers/cpufreq/powernv-cpufreq.c
> @@ -666,7 +666,7 @@ static inline void queue_gpstate_timer(struct global_pstate_info *gpstates)
> * according quadratic equation. Queues a new timer if it is still not equal
> * to local pstate
> */
> -void gpstate_timer_handler(struct timer_list *t)
> +static void gpstate_timer_handler(struct timer_list *t)
> {
> struct global_pstate_info *gpstates = from_timer(gpstates, t, timer);
> struct cpufreq_policy *policy = gpstates->policy;
> @@ -899,7 +899,7 @@ static struct notifier_block powernv_cpufreq_reboot_nb = {
> .notifier_call = powernv_cpufreq_reboot_notifier,
> };
>
> -void powernv_cpufreq_work_fn(struct work_struct *work)
> +static void powernv_cpufreq_work_fn(struct work_struct *work)
> {
> struct chip *chip = container_of(work, struct chip, throttle);
> struct cpufreq_policy *policy;
Don't you want to drop this patch now ? As you already reviewed the
other one on the list ?
--
viresh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 04/13] cpufreq: sti-cpufreq: Fix some formatting and misspelling issues
2020-07-15 8:26 ` [PATCH v2 04/13] cpufreq: sti-cpufreq: Fix some formatting and misspelling issues Lee Jones
@ 2020-07-15 9:46 ` Viresh Kumar
0 siblings, 0 replies; 20+ messages in thread
From: Viresh Kumar @ 2020-07-15 9:46 UTC (permalink / raw)
To: Lee Jones
Cc: linux-pm, rjw, Patrice Chotard, linux-kernel, Pal Singh,
linux-arm-kernel
On 15-07-20, 09:26, Lee Jones wrote:
> Kerneldoc format for attribute descriptions should be '@.*: '.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/cpufreq/sti-cpufreq.c:49: warning: cannot understand function prototype: 'struct sti_cpufreq_ddata '
>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Pal Singh <ajitpal.singh@st.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/cpufreq/sti-cpufreq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c
> index 8f16bbb164b84..a5ad96d29adca 100644
> --- a/drivers/cpufreq/sti-cpufreq.c
> +++ b/drivers/cpufreq/sti-cpufreq.c
> @@ -40,11 +40,11 @@ enum {
> };
>
> /**
> - * ST CPUFreq Driver Data
> + * struct sti_cpufreq_ddata - ST CPUFreq Driver Data
> *
> - * @cpu_node CPU's OF node
> - * @syscfg_eng Engineering Syscon register map
> - * @regmap Syscon register map
> + * @cpu: CPU's OF node
> + * @syscfg_eng: Engineering Syscon register map
> + * @syscfg: Syscon register map
> */
> static struct sti_cpufreq_ddata {
> struct device *cpu;
I already applied the one from V1 earlier this morning.
--
viresh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 00/13] Rid W=1 warnings in CPUFreq
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (12 preceding siblings ...)
2020-07-15 8:26 ` [PATCH v2 13/13] cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as __maybe_unused Lee Jones
@ 2020-07-15 9:46 ` Viresh Kumar
2020-07-15 13:23 ` Rafael J. Wysocki
14 siblings, 0 replies; 20+ messages in thread
From: Viresh Kumar @ 2020-07-15 9:46 UTC (permalink / raw)
To: Lee Jones; +Cc: rjw, linux-kernel, linux-arm-kernel, linux-pm
On 15-07-20, 09:26, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
>
> After these patches are applied, the build system no longer
> complains about any W=0 nor W=1 level warnings in drivers/cpufreq.
>
> Hurrah!
>
> Changelog
>
> v1 => v2:
> - Collect *-bys
> - Use __maybe_unused instead of removing device IDs
> - Use __always_unused instead of using unused variables
> - Include architecture header instead of creating new include file
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static
2020-07-15 9:45 ` Viresh Kumar
@ 2020-07-15 10:13 ` Lee Jones
0 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2020-07-15 10:13 UTC (permalink / raw)
To: Viresh Kumar
Cc: linux-pm, Michael Ellerman, rjw, linux-kernel, Paul Mackerras,
Benjamin Herrenschmidt, linuxppc-dev, linux-arm-kernel
On Wed, 15 Jul 2020, Viresh Kumar wrote:
> On 15-07-20, 09:26, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/cpufreq/powernv-cpufreq.c:669:6: warning: no previous prototype for ‘gpstate_timer_handler’ [-Wmissing-prototypes]
> > drivers/cpufreq/powernv-cpufreq.c:902:6: warning: no previous prototype for ‘powernv_cpufreq_work_fn’ [-Wmissing-prototypes]
> >
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> > drivers/cpufreq/powernv-cpufreq.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> > index 8646eb197cd96..068cc53abe320 100644
> > --- a/drivers/cpufreq/powernv-cpufreq.c
> > +++ b/drivers/cpufreq/powernv-cpufreq.c
> > @@ -666,7 +666,7 @@ static inline void queue_gpstate_timer(struct global_pstate_info *gpstates)
> > * according quadratic equation. Queues a new timer if it is still not equal
> > * to local pstate
> > */
> > -void gpstate_timer_handler(struct timer_list *t)
> > +static void gpstate_timer_handler(struct timer_list *t)
> > {
> > struct global_pstate_info *gpstates = from_timer(gpstates, t, timer);
> > struct cpufreq_policy *policy = gpstates->policy;
> > @@ -899,7 +899,7 @@ static struct notifier_block powernv_cpufreq_reboot_nb = {
> > .notifier_call = powernv_cpufreq_reboot_notifier,
> > };
> >
> > -void powernv_cpufreq_work_fn(struct work_struct *work)
> > +static void powernv_cpufreq_work_fn(struct work_struct *work)
> > {
> > struct chip *chip = container_of(work, struct chip, throttle);
> > struct cpufreq_policy *policy;
>
> Don't you want to drop this patch now ? As you already reviewed the
> other one on the list ?
Yes, please drop/ignore.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 00/13] Rid W=1 warnings in CPUFreq
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
` (13 preceding siblings ...)
2020-07-15 9:46 ` [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Viresh Kumar
@ 2020-07-15 13:23 ` Rafael J. Wysocki
14 siblings, 0 replies; 20+ messages in thread
From: Rafael J. Wysocki @ 2020-07-15 13:23 UTC (permalink / raw)
To: Lee Jones
Cc: Viresh Kumar, Rafael J. Wysocki, Linux Kernel Mailing List,
Linux ARM, Linux PM
On Wed, Jul 15, 2020 at 10:27 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
>
> After these patches are applied, the build system no longer
> complains about any W=0 nor W=1 level warnings in drivers/cpufreq.
>
> Hurrah!
>
> Changelog
>
> v1 => v2:
> - Collect *-bys
> - Use __maybe_unused instead of removing device IDs
> - Use __always_unused instead of using unused variables
> - Include architecture header instead of creating new include file
>
> Lee Jones (13):
> cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard
> comment blocks
> cpufreq: cpufreq: Demote lots of function headers unworthy of
> kerneldoc status
> cpufreq: cpufreq_governor: Demote store_sampling_rate() header to
> standard comment block
> cpufreq: sti-cpufreq: Fix some formatting and misspelling issues
> cpufreq: pasemi: Include header file for {check,restore}_astate
> prototypes
> cpufreq: powernv-cpufreq: Functions only used in call-backs should be
> static
> cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues
> cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused
> cpufreq: acpi-cpufreq: Mark sometimes used ID structs as
> __maybe_unused
> cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as
> __always_unused
> cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused
> cpufreq: intel_pstate: Supply struct attribute description for
> get_aperf_mperf_shift()
> cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as
> __maybe_unused
>
> drivers/cpufreq/acpi-cpufreq.c | 8 +++----
> drivers/cpufreq/amd_freq_sensitivity.c | 2 +-
> drivers/cpufreq/cpufreq.c | 32 ++++++++++++++------------
> drivers/cpufreq/cpufreq_governor.c | 2 +-
> drivers/cpufreq/freq_table.c | 6 ++---
> drivers/cpufreq/intel_pstate.c | 2 ++
> drivers/cpufreq/pasemi-cpufreq.c | 2 ++
> drivers/cpufreq/pcc-cpufreq.c | 2 +-
> drivers/cpufreq/powernow-k8.c | 4 ++--
> drivers/cpufreq/powernv-cpufreq.c | 15 ++++++------
> drivers/cpufreq/sti-cpufreq.c | 8 +++----
> 11 files changed, 45 insertions(+), 38 deletions(-)
>
> --
All patches except for the [04/13] (applied by Viresh) and [06/13]
(requested to be ignored) applied as 5.9 material with the ACKs from
Viresh, thanks!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused
2020-07-15 8:26 ` [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused Lee Jones
@ 2020-07-22 12:50 ` Pavel Machek
0 siblings, 0 replies; 20+ messages in thread
From: Pavel Machek @ 2020-07-22 12:50 UTC (permalink / raw)
To: Lee Jones
Cc: rjw, linux-pm, viresh.kumar, Paul Devriendt, Andreas Herrmann,
linux-kernel, Mark Langsdorf, linux-arm-kernel,
Dominik Brodowski
[-- Attachment #1.1: Type: text/plain, Size: 1055 bytes --]
On Wed 2020-07-15 09:26:31, Lee Jones wrote:
> if we fail to use a variable, even a dummy ones, then the compiler
> complains that it is set but not used. We know this is fine, so we
> set them as __always_unused here to let the compiler know.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/cpufreq/powernow-k8.c: In function ‘pending_bit_stuck’:
> drivers/cpufreq/powernow-k8.c:89:10: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable]
> 89 | u32 lo, hi;
> | ^~
> drivers/cpufreq/powernow-k8.c: In function ‘core_voltage_pre_transition’:
> drivers/cpufreq/powernow-k8.c:285:14: warning: variable ‘lo’ set but not used [-Wunused-but-set-variable]
> 285 | u32 maxvid, lo, rvomult = 1;
> | ^~
>
> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
> Cc: Dominik Brodowski <linux@brodo.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2020-07-22 12:51 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15 8:26 [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Lee Jones
2020-07-15 8:26 ` [PATCH v2 01/13] cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-15 8:26 ` [PATCH v2 02/13] cpufreq: cpufreq: Demote lots of function headers unworthy of kerneldoc status Lee Jones
2020-07-15 8:26 ` [PATCH v2 03/13] cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block Lee Jones
2020-07-15 8:26 ` [PATCH v2 04/13] cpufreq: sti-cpufreq: Fix some formatting and misspelling issues Lee Jones
2020-07-15 9:46 ` Viresh Kumar
2020-07-15 8:26 ` [PATCH v2 05/13] cpufreq: pasemi: Include header file for {check, restore}_astate prototypes Lee Jones
2020-07-15 8:26 ` [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static Lee Jones
2020-07-15 9:45 ` Viresh Kumar
2020-07-15 10:13 ` Lee Jones
2020-07-15 8:26 ` [PATCH v2 07/13] cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues Lee Jones
2020-07-15 8:26 ` [PATCH v2 08/13] cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused Lee Jones
2020-07-15 8:26 ` [PATCH v2 09/13] cpufreq: acpi-cpufreq: Mark sometimes used ID structs as __maybe_unused Lee Jones
2020-07-15 8:26 ` [PATCH v2 10/13] cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused Lee Jones
2020-07-22 12:50 ` Pavel Machek
2020-07-15 8:26 ` [PATCH v2 11/13] cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused Lee Jones
2020-07-15 8:26 ` [PATCH v2 12/13] cpufreq: intel_pstate: Supply struct attribute description for get_aperf_mperf_shift() Lee Jones
2020-07-15 8:26 ` [PATCH v2 13/13] cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as __maybe_unused Lee Jones
2020-07-15 9:46 ` [PATCH v2 00/13] Rid W=1 warnings in CPUFreq Viresh Kumar
2020-07-15 13:23 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).