* [PATCH] sched/topology: change sched_energy_mutex and sched_energy_update to static
@ 2022-07-03 15:31 Tom Rix
2022-07-12 14:37 ` Valentin Schneider
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2022-07-03 15:31 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman, bristot, vschneid, rafael.j.wysocki,
qperret, ionela.voinescu
Cc: linux-kernel, Tom Rix
sparse reports
kernel/sched/topology.c:210:1: warning: symbol 'sched_energy_mutex' was not declared. Should it be static?
kernel/sched/topology.c:211:6: warning: symbol 'sched_energy_update' was not declared. Should it be static?
When the commit listed in the fixes tag happened, the sched_energy_mutex
and sched_energy_update variable accesses were wrapped by a function and
the variables were and still are only accessed in the topology.c file.
So change their storage class specifiers to static.
Fixes: 31f6a8c0a471 ("sched/topology,schedutil: Wrap sched domains rebuild")
Signed-off-by: Tom Rix <trix@redhat.com>
---
kernel/sched/topology.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 8739c2a5a54e..412e2ddcade6 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -207,8 +207,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);
static 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)
{
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/topology: change sched_energy_mutex and sched_energy_update to static
2022-07-03 15:31 [PATCH] sched/topology: change sched_energy_mutex and sched_energy_update to static Tom Rix
@ 2022-07-12 14:37 ` Valentin Schneider
0 siblings, 0 replies; 2+ messages in thread
From: Valentin Schneider @ 2022-07-12 14:37 UTC (permalink / raw)
To: Tom Rix, mingo, peterz, juri.lelli, vincent.guittot,
dietmar.eggemann, rostedt, bsegall, mgorman, bristot,
rafael.j.wysocki, qperret, ionela.voinescu
Cc: linux-kernel, Tom Rix
On 03/07/22 11:31, Tom Rix wrote:
> sparse reports
> kernel/sched/topology.c:210:1: warning: symbol 'sched_energy_mutex' was not declared. Should it be static?
> kernel/sched/topology.c:211:6: warning: symbol 'sched_energy_update' was not declared. Should it be static?
>
> When the commit listed in the fixes tag happened, the sched_energy_mutex
> and sched_energy_update variable accesses were wrapped by a function and
> the variables were and still are only accessed in the topology.c file.
> So change their storage class specifiers to static.
>
> Fixes: 31f6a8c0a471 ("sched/topology,schedutil: Wrap sched domains rebuild")
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-12 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-03 15:31 [PATCH] sched/topology: change sched_energy_mutex and sched_energy_update to static Tom Rix
2022-07-12 14:37 ` Valentin Schneider
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®