Skip to contentSkip to conversation

sched/topology: Mark some symbols with static keyword

PATCH Superseded Zou Wei 2 participants 3 messages Nov 24, 2020 – Nov 25, 2020 Scheduler

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 sched/topology: Mark some symbols with static keyword

Fix the following sparse warnings:

kernel/sched/topology.c:211:1: warning: symbol 'sched_energy_mutex' was not declared. Should it be static? kernel/sched/topology.c:212:6: warning: symbol 'sched_energy_update' was not declared. Should it be static?

---
 kernel/sched/topology.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/topology.c +2 -2
index 5d3675c..2676687 100644
@@ -208,8 +208,8 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent)
 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
 DEFINE_STATIC_KEY_FALSE(sched_energy_present);
 unsigned int sysctl_sched_energy_aware = 1;
-DEFINE_MUTEX(sched_energy_mutex);
-bool sched_energy_update;
+static DEFINE_MUTEX(sched_energy_mutex);
+static bool sched_energy_update;
 
 void rebuild_sched_domains_energy(void)
 {
Signature · 1 line
2.6.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Zou Wei

Fix the following sparse warnings:

kernel/sched/topology.c:211:1: warning: symbol 'sched_energy_mutex' was not declared. Should it be static? kernel/sched/topology.c:212:6: warning: symbol 'sched_energy_update' was not declared. Should it be static?

I think this wants:

Fixes 31f6a8c0a471 ("sched/topology,schedutil: Wrap sched domains rebuild")

But, with that:

Thanks,
Quentin

author Reviewed-by Quentin Perret
#2 lore raw

Quentin,
Thanks for the review. I will send the v2 soon.

-----邮件原件-----
发件人: Quentin Perret [mailto:[email protected]]
发送时间: 2020年11月24日 21:24
收件人: Zouwei (Samuel) <[email protected]>
抄送: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected] 主题: Re: [PATCH -next] sched/topology: Mark some symbols with static keyword

Quoted 6 lines · Zou Wei

Fix the following sparse warnings:

kernel/sched/topology.c:211:1: warning: symbol 'sched_energy_mutex' was not declared. Should it be static? kernel/sched/topology.c:212:6: warning: symbol 'sched_energy_update' was not declared. Should it be static?

I think this wants:

Fixes 31f6a8c0a471 ("sched/topology,schedutil: Wrap sched domains rebuild")

But, with that:

Thanks,
Quentin