lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241025101058.GK14555@noisy.programming.kicks-ass.net>
Date: Fri, 25 Oct 2024 12:10:58 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Christian Loehle <christian.loehle@....com>
Cc: Dietmar Eggemann <dietmar.eggemann@....com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Valentin Schneider <vschneid@...hat.com>,
	Juri Lelli <juri.lelli@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] sched/uclamp: Fix unnused variable warning

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@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410060258.bPl2ZoUo-lkp@intel.com/
> Signed-off-by: Christian Loehle <christian.loehle@....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?"



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ