From nobody Mon Jun 15 23:18:41 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 037023E7163 for ; Tue, 14 Apr 2026 13:28:12 +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=1776173294; cv=none; b=FYvFntj1BpuxBmQgYXSit//hJStx3HA97CZT+AmAamugcPdSx2F4v+8oUVORm/dl+09MvPtkdiH4BcrypuoyBUHFvR/1TVvd6ktEYfH4QUq3Yx3CcgRooloAW021wou7R/1J3B41ZNzPZJtK2fSukKZLJrofwxlt1oLAOT3Gezc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776173294; c=relaxed/simple; bh=CkqqWnZ/7qBTK8c2/xuX0ONIv9/5APXXd5FmS3QEyTY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hyResfPaob867XtLT67g2j8gibPtKqfG7ErbGsCD2JyXb2b7fy7ve40ewqIiByTSj7pPh6Ookf1fKQNr1ih+C66kzQDTtbUxqUsQt+VIRhQjsp7tszyUgJ3oh0HQ5raBOEo1DttYH115jQRtfRDdhEeTO/AkOwbc2RpoDmJztbk= 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; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=K8KsHAJT; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="K8KsHAJT" 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 9E06D4E8A; Tue, 14 Apr 2026 06:28:06 -0700 (PDT) Received: from e134344.cambridge.arm.com (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 06ACE3F7B4; Tue, 14 Apr 2026 06:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1776173292; bh=CkqqWnZ/7qBTK8c2/xuX0ONIv9/5APXXd5FmS3QEyTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K8KsHAJTPYanSmJzKqZ/1Oal0hodVVErmc3wOoOpVt1JB3MVFmmh/9b8cGuFk2OpG OgH7wJ6ja8HS6Nuaq4nPGVp8cwZRVFVx1VmzPVhhobt/unM0ofS9u19XAGoXZrr0k8 flP2Y8RvyQjjztoiUWcuj+sf6pzoowpa8wf07KHU= From: Ben Horgan To: ben.horgan@arm.com Cc: Dan Carpenter , Dan Carpenter , James Morse , Reinette Chatre , Fenghua Yu , lkml , linux-arm-kernel Subject: [PATCH v1 1/2] arm_mpam: resctrl: Fix broken error path in mpam_resctrl_alloc_domain() Date: Tue, 14 Apr 2026 14:27:56 +0100 Message-ID: <20260414132758.196874-2-ben.horgan@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260414132758.196874-1-ben.horgan@arm.com> References: <20260414132758.196874-1-ben.horgan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dan Carpenter reports that, in mpam_resctrl_alloc_domain(), any_mon_comp is used in an 'if' condition when it may be uninitialized. Initialize it to NULL so that the check behaves correctly when no monitor components are found. Reported-by: Dan Carpenter Fixes: 264c285999fc ("arm_mpam: resctrl: Add monitor initialisation and dom= ain boilerplate") Signed-off-by: Ben Horgan --- drivers/resctrl/mpam_resctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c index a9938006d0e6..d80df486a313 100644 --- a/drivers/resctrl/mpam_resctrl.c +++ b/drivers/resctrl/mpam_resctrl.c @@ -1399,7 +1399,7 @@ mpam_resctrl_alloc_domain(unsigned int cpu, struct mp= am_resctrl_res *res) } =20 if (r->mon_capable) { - struct mpam_component *any_mon_comp; + struct mpam_component *any_mon_comp =3D NULL; struct mpam_resctrl_mon *mon; enum resctrl_event_id eventid; =20 --=20 2.43.0 From nobody Mon Jun 15 23:18:41 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57A503E6DDB for ; Tue, 14 Apr 2026 13:28:14 +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=1776173296; cv=none; b=j3kO2EcxZuduIlxxLP5juylrTx/YJSghRvi7YfQUY2P9TzVBWo6O50unFfH3Ul4ePp1uUH+1tS6pXXnhzI20/IO4PBBjMZol4bKNXafxr2IdfXYFUoPJ8p1jWL3x9kNCoVEWhLfFJcMuUBCNXAp7pH0nhgJgNvtsTSRRWSZdIAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776173296; c=relaxed/simple; bh=CkqqWnZ/7qBTK8c2/xuX0ONIv9/5APXXd5FmS3QEyTY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LUPABUXg6lqmKz4CV8YUG7EsolPZfonY9t902C6jiAq+wjOaVQqF/yx7xaN9m2Yz0mg9jqLU0HEiELxxcjFEfup80+654t9288wTloM9oCUgK6kCh5v5/kdX7JBvy73ExiVz28u0ubIFqauOzhjf73/lWQW1BECo1qxCeRO/T2Q= 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; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=gh0Q5iyU; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="gh0Q5iyU" 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 3AF7E4F12; Tue, 14 Apr 2026 06:28:08 -0700 (PDT) Received: from e134344.cambridge.arm.com (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 96E2A3F7B4; Tue, 14 Apr 2026 06:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1776173293; bh=CkqqWnZ/7qBTK8c2/xuX0ONIv9/5APXXd5FmS3QEyTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gh0Q5iyUwM05Jy4hH31LJJaSluJUTCH0Hf3MzNdJK53QArlJi8uUzPXr33rJyyscp FQ9NweD8G5QtKvFUWOfPi/RpqpwqKv80g/pMNUuc4/i8Nic1BN3CIbroFzPtLpinG8 SWUgP66tAhLk6UzXIzQNu39ylaxDmSuCgGPqbJKM= From: Ben Horgan To: ben.horgan@arm.com Cc: Dan Carpenter , Dan Carpenter , James Morse , Reinette Chatre , Fenghua Yu , lkml , linux-arm-kernel Subject: [PATCH v1 1/2] arm_mpam: resctrl: Fix the check for no monitor components found Date: Tue, 14 Apr 2026 14:27:57 +0100 Message-ID: <20260414132758.196874-3-ben.horgan@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260414132758.196874-1-ben.horgan@arm.com> References: <20260414132758.196874-1-ben.horgan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dan Carpenter reports that, in mpam_resctrl_alloc_domain(), any_mon_comp is used in an 'if' condition when it may be uninitialized. Initialize it to NULL so that the check behaves correctly when no monitor components are found. Reported-by: Dan Carpenter Fixes: 264c285999fc ("arm_mpam: resctrl: Add monitor initialisation and dom= ain boilerplate") Signed-off-by: Ben Horgan Reviewed-by: Gavin Shan --- drivers/resctrl/mpam_resctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c index a9938006d0e6..d80df486a313 100644 --- a/drivers/resctrl/mpam_resctrl.c +++ b/drivers/resctrl/mpam_resctrl.c @@ -1399,7 +1399,7 @@ mpam_resctrl_alloc_domain(unsigned int cpu, struct mp= am_resctrl_res *res) } =20 if (r->mon_capable) { - struct mpam_component *any_mon_comp; + struct mpam_component *any_mon_comp =3D NULL; struct mpam_resctrl_mon *mon; enum resctrl_event_id eventid; =20 --=20 2.43.0 From nobody Mon Jun 15 23:18:41 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E9123E0C66 for ; Tue, 14 Apr 2026 13:28:16 +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=1776173301; cv=none; b=LjDDRP6mUDhcaIDrVE0VFeEY0nXyiqsC4c5egkyEEsIc67h+eLfvSBXg6xLZw3y0H0v15t+208kucDV5roOUn5ya1ytRN1k3NEa93dNXxVg00w9pLMIUxR3rmec0IwLoBzUF+QKmo7beJcS5czYGmDyAs3N2Vzvrl2bafib4vo8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776173301; c=relaxed/simple; bh=HMzN+2rajCGdvWg1so8Az2z0J7swU487eh13m8v6SPI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=td9MABcB/867vsqC9InwekEe0ZdMfzC/fHyAlaIybgE37lPFFCPeCDMkdp9bZbZNImUyQi+PPeY/sK1jo+S0qsBYdyfjFC6rVxR/Zni13UGqCRMUqubNt3FDURgncnSH5ZjqG9oLirlxN7iJFWBJrNpqU8ctNEkvte7jtKoReoA= 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; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=cEtJS8P4; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="cEtJS8P4" 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 EAD184E8A; Tue, 14 Apr 2026 06:28:09 -0700 (PDT) Received: from e134344.cambridge.arm.com (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3334D3F7B4; Tue, 14 Apr 2026 06:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1776173295; bh=HMzN+2rajCGdvWg1so8Az2z0J7swU487eh13m8v6SPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEtJS8P4RiQUJJ1QiaaJCMt+yU59xcofiec0MhrOr3+1G6sB/0KqvwL69k64SxRAH dKaRyICKuOH4/slloOp9LlGhEOPe9uOiFrAC1agcvTo7nWj7xNK99uD5D7TsBH3kXT llPzvS28Ttt48NFqMsfir3lSbaM+DNabmNjsoVU8= From: Ben Horgan To: ben.horgan@arm.com Cc: Dan Carpenter , Dan Carpenter , James Morse , Reinette Chatre , Fenghua Yu , lkml , linux-arm-kernel , kernel test robot Subject: [PATCH v1 2/2] arm_mpam: resctrl: Make resctrl_mon_ctx_waiters static Date: Tue, 14 Apr 2026 14:27:58 +0100 Message-ID: <20260414132758.196874-4-ben.horgan@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260414132758.196874-1-ben.horgan@arm.com> References: <20260414132758.196874-1-ben.horgan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" resctrl_mon_ctx_waiters is not used outside of this file, so make it static. This fixes the sparse warning: drivers/resctrl/mpam_resctrl.c:25:1: warning: symbol 'resctrl_mon_ctx_waite= rs' was not declared. Should it be static? Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202603281842.c2K96tJA-lkp@int= el.com/ Fixes: 2a3c79c61539 ("arm_mpam: resctrl: Allow resctrl to allocate monitors= ") Signed-off-by: Ben Horgan Reviewed-by: Gavin Shan --- drivers/resctrl/mpam_resctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c index d80df486a313..bb933b224851 100644 --- a/drivers/resctrl/mpam_resctrl.c +++ b/drivers/resctrl/mpam_resctrl.c @@ -22,7 +22,7 @@ =20 #include "mpam_internal.h" =20 -DECLARE_WAIT_QUEUE_HEAD(resctrl_mon_ctx_waiters); +static DECLARE_WAIT_QUEUE_HEAD(resctrl_mon_ctx_waiters); =20 /* * The classes we've picked to map to resctrl resources, wrapped --=20 2.43.0