From nobody Mon Nov 25 17:56:52 2024 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73A971F8194 for ; Fri, 25 Oct 2024 10:53:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729853605; cv=none; b=Yg4ntyGX9s6C1uuIscIQJHe4dEOc23ePdxldyhlo0n2UBnjXA8xbhmp94fq01IKLLCEvefbKaA8durp+b6bp5LKPUUqoivsC1rCSG6lPyod7MKGleUChqs24c+FKB8SbOecP7D8y6aVLmtO9vWrpHv7wavinSrpltFUYw3bPUO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729853605; c=relaxed/simple; bh=4eplxcpNV43NDIMT6KvgLcMP8I99OwtVqevNRGtDvaE=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=hR0EBzpuhBXrfmfMSz3gCTIdTHTXv57DPDx0eUZDy9B6XZFaVgSOv6Pvsd8gKmUvDcFbP8cqo4syLVISM0Z94zez7aZq+p5s4E+6dobMzdhuTV2NLuXJ+W5YRXnSYzwglTJ5IcRoLQ9cjgBBds1f+W/y3Bu+iz4TKqq3BratEKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6AD94339; Fri, 25 Oct 2024 03:53:52 -0700 (PDT) Received: from [10.57.55.246] (unknown [10.57.55.246]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 106F63F73B; Fri, 25 Oct 2024 03:53:19 -0700 (PDT) Message-ID: Date: Fri, 25 Oct 2024 11:53:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Peter Zijlstra , Sebastian Siewior Cc: Thomas Gleixner , Juri Lelli , Ingo Molnar , "linux-kernel@vger.kernel.org" , Vincent Guittot , oe-kbuild-all@lists.linux.dev, kernel test robot , Valentin Schneider , Dietmar Eggemann , xiqi2@huawei.com From: Christian Loehle Subject: [PATCHv2] sched/uclamp: Fix unnused variable warning Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" uclamp_mutex is only used for CONFIG_SYSCTL or CONFIG_UCLAMP_TASK_GROUP so declare it __maybe_unused. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202410060258.bPl2ZoUo-lkp@int= el.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202410250459.EJe6PJI5-lkp@int= el.com/ Signed-off-by: Christian Loehle --- v2: __maybe_unused instead of ifdef (Peter) kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 114adac5a9c8..9bad282e7950 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1399,7 +1399,7 @@ void set_load_weight(struct task_struct *p, bool upda= te_load) * requests are serialized using a mutex to reduce the risk of conflicting * updates or API abuses. */ -static DEFINE_MUTEX(uclamp_mutex); +static __maybe_unused DEFINE_MUTEX(uclamp_mutex); /* Max allowed minimum utilization */ static unsigned int __maybe_unused sysctl_sched_uclamp_util_min =3D SCHED_= CAPACITY_SCALE; -- 2.34.1