From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 100822FAC12; Mon, 16 Feb 2026 08:00:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771228840; cv=none; b=hdkeGgXgdslxNavr6Q74aXD2Ybm+8szYhnWimqa3QlFCw67+oJFoFYButMoisS52O7GPGF+p1P+6hbQmE4nwrXMMTUVXwoLCDsBPHcwYsI4OKm612WX0NxTQZHCdIAFTsFUciwqxEZ1XYa6K2ePETzQ3EHJoOjuymxK9fTyMOUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771228840; c=relaxed/simple; bh=bgVZxugtG1BIY6QjYFyiwvvgJVmuYucZxrEWFggHE0c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uJ4F8HLFu6gDgzhpTX2Ljuti71hFmczFk2f8zvoVLc23Qz/WOyWsQvUASQJtAgSXQSYUDfMeuQXiyWpt4P1mmRT9jfEMvuGWgB7mKiOuyIDnCUXrj1ziH4bxuRiR89+MvAoF/HHQSzGZNZvz6DRj+6hlm82qKrjybeQor5TNako= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=to6pMS6g; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="to6pMS6g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAAAEC116C6; Mon, 16 Feb 2026 08:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771228839; bh=bgVZxugtG1BIY6QjYFyiwvvgJVmuYucZxrEWFggHE0c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=to6pMS6gnBNHz/7wV3hwOoMISgHhcS+x+ywpBQnekvt0uF1qDOFgvKkZlSIPhNtur rstZn/aylXngqLQiN9iSZV6nT6D/DJVchgaNlJlBaqMKzP3CuFmhSKgERG5j3vXK0b Z65CEznvF3c10Z0uWqJ80Ji60vgI87PsIZoNhYVQPTkB09ue7cPdUEeo0iSzqWyS7T uNnih/DwWEubMrDEJ0xK/elwY8JG9vUolbZew7woymgr0sO+5tT409IXj6D7HFZljQ xjAMLIU+kl6WFdWPuV05XSyDADBeTVC6m84aWsZIshbCWefKizG4xNXNKKtSYq0zDx zDNLOurdc/MGw== Received: from johan by rho.lan with local (Exim 4.98.2) (envelope-from ) id 1vrtX1-0000000033q-2lIc; Mon, 16 Feb 2026 09:00:35 +0100 Date: Mon, 16 Feb 2026 09:00:35 +0100 From: Johan Hovold To: Krzysztof Kozlowski Cc: Maximilian Luz , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] firmware: qcom: uefisecapp: Annotate acquiring locks for sparse Message-ID: References: <20260215110548.34152-4-krzysztof.kozlowski@oss.qualcomm.com> <20260215110548.34152-5-krzysztof.kozlowski@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260215110548.34152-5-krzysztof.kozlowski@oss.qualcomm.com> On Sun, Feb 15, 2026 at 12:05:50PM +0100, Krzysztof Kozlowski wrote: > qcuefi_acquire() and qcuefi_release() end with mutex locked or unlocked > respectively, so annotate them so the lock usage will be tracked by > sparse. > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/firmware/qcom/qcom_qseecom_uefisecapp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/firmware/qcom/qcom_qseecom_uefisecapp.c b/drivers/firmware/qcom/qcom_qseecom_uefisecapp.c > index 21be447374aa..befa68d1dcaf 100644 > --- a/drivers/firmware/qcom/qcom_qseecom_uefisecapp.c > +++ b/drivers/firmware/qcom/qcom_qseecom_uefisecapp.c > @@ -710,6 +710,7 @@ static int qcuefi_set_reference(struct qcuefi_client *qcuefi) > } > > static struct qcuefi_client *qcuefi_acquire(void) > + __acquires(__qcuefi_lock) > { > mutex_lock(&__qcuefi_lock); > if (!__qcuefi) { > @@ -720,6 +721,7 @@ static struct qcuefi_client *qcuefi_acquire(void) > } > > static void qcuefi_release(void) > + __releases(__qcuefi_lock) > { > mutex_unlock(&__qcuefi_lock); > } The mutex implementation does not use sparse annotation so this actually introduces sparse warnings (unless something changed very recently). See https://lore.kernel.org/all/ZJ11H8btBhvCx9gD@hovoldconsulting.com/ for what his looks like for the code in question. Johan