Skip to content

Commit 23f1178

Browse files
cloehlePeter Zijlstra
authored andcommitted
sched/uclamp: Fix unnused variable warning
uclamp_mutex is only used for CONFIG_SYSCTL or CONFIG_UCLAMP_TASK_GROUP so declare it __maybe_unused. Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Reported-by: kernel test robot <[email protected]> Signed-off-by: Christian Loehle <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent d1fb8a7 commit 23f1178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ void set_load_weight(struct task_struct *p, bool update_load)
13991399
* requests are serialized using a mutex to reduce the risk of conflicting
14001400
* updates or API abuses.
14011401
*/
1402-
static DEFINE_MUTEX(uclamp_mutex);
1402+
static __maybe_unused DEFINE_MUTEX(uclamp_mutex);
14031403

14041404
/* Max allowed minimum utilization */
14051405
static unsigned int __maybe_unused sysctl_sched_uclamp_util_min = SCHED_CAPACITY_SCALE;

0 commit comments

Comments
 (0)