* [PATCH -next] cpufreq: powernv: Make some symbols static
@ 2020-07-14 14:23 Wei Yongjun
2020-07-15 3:41 ` Viresh Kumar
2020-07-15 15:31 ` Rafael J. Wysocki
0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2020-07-14 14:23 UTC (permalink / raw)
To: Hulk Robot, Rafael J. Wysocki, Viresh Kumar, Michael Ellerman
Cc: Wei Yongjun, linux-pm, linuxppc-dev
The sparse tool complains as follows:
drivers/cpufreq/powernv-cpufreq.c:88:1: warning:
symbol 'pstate_revmap' was not declared. Should it be static?
drivers/cpufreq/powernv-cpufreq.c:383:18: warning:
symbol 'cpufreq_freq_attr_cpuinfo_nominal_freq' was not declared. Should it be static?
drivers/cpufreq/powernv-cpufreq.c:669:6: warning:
symbol 'gpstate_timer_handler' was not declared. Should it be static?
drivers/cpufreq/powernv-cpufreq.c:902:6: warning:
symbol 'powernv_cpufreq_work_fn' was not declared. Should it be static?
Those symbols are not used outside of this file, so mark
them static.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/cpufreq/powernv-cpufreq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 8646eb197cd9..cf118263ec65 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -85,7 +85,7 @@ struct global_pstate_info {
static struct cpufreq_frequency_table powernv_freqs[POWERNV_MAX_PSTATES+1];
-DEFINE_HASHTABLE(pstate_revmap, POWERNV_MAX_PSTATES_ORDER);
+static DEFINE_HASHTABLE(pstate_revmap, POWERNV_MAX_PSTATES_ORDER);
/**
* struct pstate_idx_revmap_data: Entry in the hashmap pstate_revmap
* indexed by a function of pstate id.
@@ -380,7 +380,7 @@ static ssize_t cpuinfo_nominal_freq_show(struct cpufreq_policy *policy,
powernv_freqs[powernv_pstate_info.nominal].frequency);
}
-struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
+static struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
__ATTR_RO(cpuinfo_nominal_freq);
#define SCALING_BOOST_FREQS_ATTR_INDEX 2
@@ -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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] cpufreq: powernv: Make some symbols static
2020-07-14 14:23 [PATCH -next] cpufreq: powernv: Make some symbols static Wei Yongjun
@ 2020-07-15 3:41 ` Viresh Kumar
2020-07-15 6:50 ` Lee Jones
2020-07-15 15:31 ` Rafael J. Wysocki
1 sibling, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2020-07-15 3:41 UTC (permalink / raw)
To: Wei Yongjun, lee.jones
Cc: Hulk Robot, Rafael J. Wysocki, Michael Ellerman, linux-pm, linuxppc-dev
On 14-07-20, 22:23, Wei Yongjun wrote:
> The sparse tool complains as follows:
>
> drivers/cpufreq/powernv-cpufreq.c:88:1: warning:
> symbol 'pstate_revmap' was not declared. Should it be static?
> drivers/cpufreq/powernv-cpufreq.c:383:18: warning:
> symbol 'cpufreq_freq_attr_cpuinfo_nominal_freq' was not declared. Should it be static?
> drivers/cpufreq/powernv-cpufreq.c:669:6: warning:
> symbol 'gpstate_timer_handler' was not declared. Should it be static?
> drivers/cpufreq/powernv-cpufreq.c:902:6: warning:
> symbol 'powernv_cpufreq_work_fn' was not declared. Should it be static?
>
> Those symbols are not used outside of this file, so mark
> them static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/cpufreq/powernv-cpufreq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Lee also sent a fix for this, but yours look complete :)
https://lore.kernel.org/lkml/20200714145049.2496163-7-lee.jones@linaro.org/
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] cpufreq: powernv: Make some symbols static
2020-07-15 3:41 ` Viresh Kumar
@ 2020-07-15 6:50 ` Lee Jones
0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2020-07-15 6:50 UTC (permalink / raw)
To: Viresh Kumar
Cc: Wei Yongjun, Hulk Robot, Rafael J. Wysocki, Michael Ellerman,
linux-pm, linuxppc-dev
On Wed, 15 Jul 2020, Viresh Kumar wrote:
> On 14-07-20, 22:23, Wei Yongjun wrote:
> > The sparse tool complains as follows:
> >
> > drivers/cpufreq/powernv-cpufreq.c:88:1: warning:
> > symbol 'pstate_revmap' was not declared. Should it be static?
> > drivers/cpufreq/powernv-cpufreq.c:383:18: warning:
> > symbol 'cpufreq_freq_attr_cpuinfo_nominal_freq' was not declared. Should it be static?
> > drivers/cpufreq/powernv-cpufreq.c:669:6: warning:
> > symbol 'gpstate_timer_handler' was not declared. Should it be static?
> > drivers/cpufreq/powernv-cpufreq.c:902:6: warning:
> > symbol 'powernv_cpufreq_work_fn' was not declared. Should it be static?
> >
> > Those symbols are not used outside of this file, so mark
> > them static.
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> > ---
> > drivers/cpufreq/powernv-cpufreq.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
>
> Lee also sent a fix for this, but yours look complete :)
>
> https://lore.kernel.org/lkml/20200714145049.2496163-7-lee.jones@linaro.org/
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Yes, looks good to me.
Reviewed-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] cpufreq: powernv: Make some symbols static
2020-07-14 14:23 [PATCH -next] cpufreq: powernv: Make some symbols static Wei Yongjun
2020-07-15 3:41 ` Viresh Kumar
@ 2020-07-15 15:31 ` Rafael J. Wysocki
1 sibling, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2020-07-15 15:31 UTC (permalink / raw)
To: Wei Yongjun
Cc: Hulk Robot, Rafael J. Wysocki, Viresh Kumar, Michael Ellerman,
Linux PM, linuxppc-dev
On Tue, Jul 14, 2020 at 4:14 PM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> The sparse tool complains as follows:
>
> drivers/cpufreq/powernv-cpufreq.c:88:1: warning:
> symbol 'pstate_revmap' was not declared. Should it be static?
> drivers/cpufreq/powernv-cpufreq.c:383:18: warning:
> symbol 'cpufreq_freq_attr_cpuinfo_nominal_freq' was not declared. Should it be static?
> drivers/cpufreq/powernv-cpufreq.c:669:6: warning:
> symbol 'gpstate_timer_handler' was not declared. Should it be static?
> drivers/cpufreq/powernv-cpufreq.c:902:6: warning:
> symbol 'powernv_cpufreq_work_fn' was not declared. Should it be static?
>
> Those symbols are not used outside of this file, so mark
> them static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/cpufreq/powernv-cpufreq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
> index 8646eb197cd9..cf118263ec65 100644
> --- a/drivers/cpufreq/powernv-cpufreq.c
> +++ b/drivers/cpufreq/powernv-cpufreq.c
> @@ -85,7 +85,7 @@ struct global_pstate_info {
>
> static struct cpufreq_frequency_table powernv_freqs[POWERNV_MAX_PSTATES+1];
>
> -DEFINE_HASHTABLE(pstate_revmap, POWERNV_MAX_PSTATES_ORDER);
> +static DEFINE_HASHTABLE(pstate_revmap, POWERNV_MAX_PSTATES_ORDER);
> /**
> * struct pstate_idx_revmap_data: Entry in the hashmap pstate_revmap
> * indexed by a function of pstate id.
> @@ -380,7 +380,7 @@ static ssize_t cpuinfo_nominal_freq_show(struct cpufreq_policy *policy,
> powernv_freqs[powernv_pstate_info.nominal].frequency);
> }
>
> -struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
> +static struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
> __ATTR_RO(cpuinfo_nominal_freq);
>
> #define SCALING_BOOST_FREQS_ATTR_INDEX 2
> @@ -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;
>
Applied as 5.9 material, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-15 15:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 14:23 [PATCH -next] cpufreq: powernv: Make some symbols static Wei Yongjun
2020-07-15 3:41 ` Viresh Kumar
2020-07-15 6:50 ` Lee Jones
2020-07-15 15:31 ` 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).