Skip to content

Commit 133c6c8

Browse files
Wei Yongjunrafaeljw
authored andcommitted
cpufreq: powernv: Make some symbols static
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 <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Lee Jones <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 52fe0b1 commit 133c6c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/cpufreq/powernv-cpufreq.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct global_pstate_info {
8686

8787
static struct cpufreq_frequency_table powernv_freqs[POWERNV_MAX_PSTATES+1];
8888

89-
DEFINE_HASHTABLE(pstate_revmap, POWERNV_MAX_PSTATES_ORDER);
89+
static DEFINE_HASHTABLE(pstate_revmap, POWERNV_MAX_PSTATES_ORDER);
9090
/**
9191
* struct pstate_idx_revmap_data: Entry in the hashmap pstate_revmap
9292
* indexed by a function of pstate id.
@@ -381,7 +381,7 @@ static ssize_t cpuinfo_nominal_freq_show(struct cpufreq_policy *policy,
381381
powernv_freqs[powernv_pstate_info.nominal].frequency);
382382
}
383383

384-
struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
384+
static struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
385385
__ATTR_RO(cpuinfo_nominal_freq);
386386

387387
#define SCALING_BOOST_FREQS_ATTR_INDEX 2
@@ -667,7 +667,7 @@ static inline void queue_gpstate_timer(struct global_pstate_info *gpstates)
667667
* according quadratic equation. Queues a new timer if it is still not equal
668668
* to local pstate
669669
*/
670-
void gpstate_timer_handler(struct timer_list *t)
670+
static void gpstate_timer_handler(struct timer_list *t)
671671
{
672672
struct global_pstate_info *gpstates = from_timer(gpstates, t, timer);
673673
struct cpufreq_policy *policy = gpstates->policy;
@@ -900,7 +900,7 @@ static struct notifier_block powernv_cpufreq_reboot_nb = {
900900
.notifier_call = powernv_cpufreq_reboot_notifier,
901901
};
902902

903-
void powernv_cpufreq_work_fn(struct work_struct *work)
903+
static void powernv_cpufreq_work_fn(struct work_struct *work)
904904
{
905905
struct chip *chip = container_of(work, struct chip, throttle);
906906
struct cpufreq_policy *policy;

0 commit comments

Comments
 (0)