From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796389076; b=jr91RG7VnMiMf51YmzK0SwvS7NagPPdwoIXCbA5Th55CTIRCtkrQoBDhBamVw5CTmg2W Zo371UVFC/pjCnPZwvxujCc5xwfUG2BEtEVq41xX9zucMPlyFooMHtrcEhSKPYfv5ePXU 79bXUQNszlyuCbubpIwMzrEbov+cElObEQevZ3p6mXJ0TomLnHoVNkAfkvBhQzsezQqZS u9yB/VeU/eDl88NrWIa1WScJ2QaeSa947mxkiUFRYMDgTKxp0kExyaG/v3yz5b/LFaClT TrM62ZISxAz4wZSWe+QSSIVaI6ghFGmhY1s8Hq5ev/GugItN2PiaIlEZgS5aOHhzv4w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389076; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=TUUBOLZTuDkkPwCmdhEsDBe/4Cu5Zqga91G4DPHD7+4=; b=4yzbdfAFEU2cXI5MtPi5gRNieY418JmEhP3fyZklG/c5z3jVEorUtWaZvQCG1vvVc6Dp 9SrmQ6IIQDHxdCmPUqPShs1Kxv76DapJ/6GsqNtdbpbqawL8qAwKSlQSi6Yd0Le5rcBLa fwkLxrJlp9PTQ+A4z+aNOMKY5PEhYru1BwLihM/P+5XnzYcnWF6q8d06OfIifJI+T3A7t pVXz9WFdshFjO++fM13lRZV+GOCuzUEmeJ3M92NTSMbc7DSILX4uuRWBbvHA7zwblDX2H t0L84qRfQPTrM0Ps4cOJAxfeSC2+l4SSU6A7I7UhOLB4uP072itSiu4oSJZmOS+oVHQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=KMHiVMVN; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 091DF606A32D; Fri, 4 Dec 2026 12:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=KMHiVMVN Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C91E1F00A0A; Fri, 4 Dec 2026 12:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389075; bh=TUUBOLZTuDkkPwCmdhEsDBe/4Cu5Zqga91G4DPHD7+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KMHiVMVNqhKroiAOeWRQNMy/9jMS2IE5UAkOROxKZP9JOZqCxlQ9yTAqfV1pCs07i 5rJR96U0baLjkk9aBZ5osuBFXVHot2dvxAjWQQInKXn9gX6u6wDhDM2YQMU06yNevG LJaCqjCF59bCa2EyD2kMHLTQQ0U4UTxEzZkF8tzw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Bard Liao , Rander Wang , Mark Brown , Sasha Levin Subject: [PATCH 6.1 0858/1059] ASoC: SOF: Add helper macro to be used to get an IPC ops Date: Fri, 4 Dec 2026 19:06:29 +0900 Message-ID: <20261204100706.250776746@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Ujfalusi [ Upstream commit caf0f4662e07fcc721d1c85af82aa8a7d57621f3 ] In preparation to a case when the DSP is not used. In this case the IPC communication itself has no meaning and we might not even have sdev->ipc allocated at all. The sof_ipc_get_ops() macro can be used to get a named IPC ops struct or return NULL if the sdev->ipc is not allocated. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Stable-dep-of: 3092b9e481fe ("ASoC: SOF: control: reject out-of-range enum values") Signed-off-by: Sasha Levin --- sound/soc/sof/sof-priv.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 77c9741fc1480..cf82c6cc40c86 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -495,6 +495,10 @@ struct snd_sof_ipc { const struct sof_ipc_ops *ops; }; +/* Helper to retrieve the IPC ops */ +#define sof_ipc_get_ops(sdev, ops_name) \ + (((sdev)->ipc && (sdev)->ipc->ops) ? (sdev)->ipc->ops->ops_name : NULL) + /* * SOF Device Level. */ -- 2.53.0