* [PATCH] sched/uclamp: Fix unnused variable warning
@ 2024-10-08 8:23 Christian Loehle
2024-10-25 10:01 ` Christian Loehle
2024-10-25 10:10 ` Peter Zijlstra
0 siblings, 2 replies; 4+ messages in thread
From: Christian Loehle @ 2024-10-08 8:23 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Dietmar Eggemann, Vincent Guittot, Valentin Schneider,
Juri Lelli, linux-kernel, Ingo Molnar
uclamp_mutex is only used for CONFIG_SYSCTL or
CONFIG_UCLAMP_TASK_GROUP so ifdef that to fix the compile-time warning.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410060258.bPl2ZoUo-lkp@intel.com/
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
---
kernel/sched/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 43e453ab7e20..18d9622eac8d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1394,7 +1394,9 @@ void set_load_weight(struct task_struct *p, bool update_load)
* requests are serialized using a mutex to reduce the risk of conflicting
* updates or API abuses.
*/
+#if defined(CONFIG_UCLAMP_TASK_GROUP) || defined(CONFIG_SYSCTL)
static DEFINE_MUTEX(uclamp_mutex);
+#endif
/* Max allowed minimum utilization */
static unsigned int __maybe_unused sysctl_sched_uclamp_util_min = SCHED_CAPACITY_SCALE;
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sched/uclamp: Fix unnused variable warning
2024-10-08 8:23 [PATCH] sched/uclamp: Fix unnused variable warning Christian Loehle
@ 2024-10-25 10:01 ` Christian Loehle
2024-10-25 10:03 ` Sebastian Siewior
2024-10-25 10:10 ` Peter Zijlstra
1 sibling, 1 reply; 4+ messages in thread
From: Christian Loehle @ 2024-10-25 10:01 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Dietmar Eggemann, Vincent Guittot, Valentin Schneider,
Juri Lelli, linux-kernel, Ingo Molnar, Sebastian Siewior,
Thomas Gleixner, oe-kbuild-all, kernel test robot
On 10/8/24 09:23, Christian Loehle wrote:
> uclamp_mutex is only used for CONFIG_SYSCTL or
> CONFIG_UCLAMP_TASK_GROUP so ifdef that to fix the compile-time warning.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410060258.bPl2ZoUo-lkp@intel.com/
> Signed-off-by: Christian Loehle <christian.loehle@arm.com>
> ---
> kernel/sched/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 43e453ab7e20..18d9622eac8d 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1394,7 +1394,9 @@ void set_load_weight(struct task_struct *p, bool update_load)
> * requests are serialized using a mutex to reduce the risk of conflicting
> * updates or API abuses.
> */
> +#if defined(CONFIG_UCLAMP_TASK_GROUP) || defined(CONFIG_SYSCTL)
> static DEFINE_MUTEX(uclamp_mutex);
> +#endif
>
> /* Max allowed minimum utilization */
> static unsigned int __maybe_unused sysctl_sched_uclamp_util_min = SCHED_CAPACITY_SCALE;
Gentle ping and adding CCs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sched/uclamp: Fix unnused variable warning
2024-10-25 10:01 ` Christian Loehle
@ 2024-10-25 10:03 ` Sebastian Siewior
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Siewior @ 2024-10-25 10:03 UTC (permalink / raw)
To: Christian Loehle
Cc: Peter Zijlstra, Dietmar Eggemann, Vincent Guittot,
Valentin Schneider, Juri Lelli, linux-kernel, Ingo Molnar,
Thomas Gleixner, oe-kbuild-all, kernel test robot
On 2024-10-25 11:01:08 [+0100], Christian Loehle wrote:
> Gentle ping and adding CCs
Thank you.
I poked Christian since the bot send another report
202410250459.EJe6PJI5-lkp@intel.com
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sched/uclamp: Fix unnused variable warning
2024-10-08 8:23 [PATCH] sched/uclamp: Fix unnused variable warning Christian Loehle
2024-10-25 10:01 ` Christian Loehle
@ 2024-10-25 10:10 ` Peter Zijlstra
1 sibling, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2024-10-25 10:10 UTC (permalink / raw)
To: Christian Loehle
Cc: Dietmar Eggemann, Vincent Guittot, Valentin Schneider,
Juri Lelli, linux-kernel, Ingo Molnar
On Tue, Oct 08, 2024 at 09:23:18AM +0100, Christian Loehle wrote:
> uclamp_mutex is only used for CONFIG_SYSCTL or
> CONFIG_UCLAMP_TASK_GROUP so ifdef that to fix the compile-time warning.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410060258.bPl2ZoUo-lkp@intel.com/
> Signed-off-by: Christian Loehle <christian.loehle@arm.com>
> ---
> kernel/sched/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 43e453ab7e20..18d9622eac8d 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1394,7 +1394,9 @@ void set_load_weight(struct task_struct *p, bool update_load)
> * requests are serialized using a mutex to reduce the risk of conflicting
> * updates or API abuses.
> */
> +#if defined(CONFIG_UCLAMP_TASK_GROUP) || defined(CONFIG_SYSCTL)
> static DEFINE_MUTEX(uclamp_mutex);
> +#endif
>
> /* Max allowed minimum utilization */
> static unsigned int __maybe_unused sysctl_sched_uclamp_util_min = SCHED_CAPACITY_SCALE;
> --
> 2.34.1
Bah, too much email :/ But also,
https://lkml.kernel.org/r/20241025073213.GE36494@noisy.programming.kicks-ass.net
where I said:
"sigh.. I hate our CONFIG space :/
Perhaps add __maybe_unused like the other variables it sits right next
to instead of adding yet more #ifdef crud?"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-25 10:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-08 8:23 [PATCH] sched/uclamp: Fix unnused variable warning Christian Loehle
2024-10-25 10:01 ` Christian Loehle
2024-10-25 10:03 ` Sebastian Siewior
2024-10-25 10:10 ` Peter Zijlstra
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®