Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1055038lqp; Sun, 14 Apr 2024 11:51:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX5PReGIKYubt2aEi4MsgHEdd+pe0X//bpOmQVrKIOVyF63RK1ZuSISCn9ng9XqSEG6LFSRCuFRBSiIFbJqVKXbAMM2pT+M6jfz6U8R1g== X-Google-Smtp-Source: AGHT+IFHDpvVxQFCCxjI6xISDL4ENfGv2PC/EAuyDOgWkDpeV/6OQpGPu7Ms278YCKmXRBwqRyBl X-Received: by 2002:a05:6359:7906:b0:186:2ac7:316c with SMTP id xc6-20020a056359790600b001862ac7316cmr10511701rwb.20.1713120702905; Sun, 14 Apr 2024 11:51:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713120702; cv=pass; d=google.com; s=arc-20160816; b=M4xBVD4bGUayC1YEiUa0xztdoMnR/QnxQhcMgwb+i3xZTXW6luZSaI5ByPB6i5jvK+ +DXpNQ1Qusq2B/7VpRAcTozqTOeH0Y7dN4WzGVLmVMEE9x3c9wcyPfBUh0YZQ6Jn4NbH gwHaphHtWjeLd9h4jv1KHAB5caXHxajRmv1cWptDRgeEA+U/rGDOBIg8EArwVhmwB3dX 5fJbr2qadg5GBlzyUbfUKdnPAfN1IGuYmTkcgjk3ykQ3NmSli+ab01YLA+cPwmJgtzjB KlJTOuDfhomMs+2rqrUZv/azkhUbr14lbpocgd6rXrDB1VMYW+VJ7L/nKgZBX6z8Pwz4 vd+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Q4gMnb7npsTmK07ih6lOHpmSt2KDN+hCy7eULnCz+SM=; fh=W9yRQyXYGCi9MwVjdCafpvQwWxwBN/xCwbTX3DBdTfE=; b=mo6I1gIsQxcVvCVMRsuyxPAJlcISzJpjfwKDf768U/ck4o94WFzgUKwF7fq07r2ZjM eIcvwaKfseNg7deotcj32ShMisom1GQSwq5wkVOztngx9L2TBuNRRb+wiHaCIibQ8uKU Bp5yK75e09RivIiCz+pveZm4hjvQ0/BhXizAY8VA2ewO5xaqlp08jkIdJuHT/7kP+4fD 0R25EdxIafUiJT9MxH4EkpR7aiWL2MIdsKQdlrzGMGNTsG4N/wHPsnZqnIbIp0qyMjYV LdHqyi4ZNtwyC8iwml3PZGMfDF2FkFmSDDsLjXazrycDClH0SE1XoZoyvK+htNm3rtUv yMDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oPd6yaiK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-144336-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144336-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e13-20020a170902784d00b001e3dda65129si6391067pln.644.2024.04.14.11.51.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 11:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144336-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oPd6yaiK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-144336-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144336-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 93369B22590 for ; Sun, 14 Apr 2024 18:50:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66051137C43; Sun, 14 Apr 2024 18:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oPd6yaiK" 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 8AD03135A49; Sun, 14 Apr 2024 18:48:20 +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=1713120500; cv=none; b=tCQpTaBHea3z3MBAPnBh7OL38PXstW+LVcXsrO4vhHaorbzyZP7f0T56LCA8OgwUbIgZAcfkn76tLXlyj88lfIdP9RRA1RUiRrunxlc21reJ1ZdDyt+hfLY4X97DFC7RfPmCPvz4uBoVcCzCSyu1Wl/u8R7QL8LCVWd4RdvK+xo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120500; c=relaxed/simple; bh=n7wgW58QvGruDrxcgPHZ72/9XELas9m3qnwPa8llWsk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NAJZQv5nu79xzHONyfjzrZD9Jy/+Cfc/781ItXNip6LzdiKxucVfjEFyGVwuX7ScowBKgkrrdRD0yxnWPvLXJSsiQMa26GtPIuj9iA48k8iSQL0ApaFRC0mX/IDU26kUQcMaiC85hcYtKZUC4xY3A4ijEkR6kGP1tjHHVJeAExs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oPd6yaiK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D636C3277B; Sun, 14 Apr 2024 18:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120500; bh=n7wgW58QvGruDrxcgPHZ72/9XELas9m3qnwPa8llWsk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=oPd6yaiKERZRfVPjEQ6paFa3Eued9/3Zifbwe7+YeE4e533+9/koXTx2XhCt6kRit EQgi+4+k7govpa6V9WlHHpvihWLlkvbrFif2qTCCV5ABSe9Qf+mIy1LQd7vR0s7G/O DWpNAjy6OMi7KvQgNR7Jx+cVOQelggwEvINbHWWlwEqh65rwhCHM+eF6CRn4RHqHBN qlMXJyQdEjJhVmNOooyGx4bgNEWpTD4o4gT99mG2Ct3oPuPpcHCHPDqGT6Am0+hEV+ GcARU4SBUVRixOBB+8/l918GpHJe8hbVkU4v4L8V1TwfQDkmQQUzi6CoDaHaP7D681 apGvQQcm4JetQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:29 +0200 Subject: [PATCH 04/14] ASoC: SOF: Constify stored pointer to snd_sof_dsp_ops 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240414-n-const-ops-var-v1-4-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=865; i=krzk@kernel.org; h=from:subject:message-id; bh=n7wgW58QvGruDrxcgPHZ72/9XELas9m3qnwPa8llWsk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTHoHVG8jIRMuSyEz6gw6s3WlC+CMzYEr3rQ MYLccCWoXGJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkxwAKCRDBN2bmhouD 10RkD/9D3WRc5sgDCLrfb2gtoEJht5UdUfaYqmyCGnC4zF64/kGjFd3mRP0+XjHAYrAPJU2U0ev +aMgqK7guv6mDoeOaa1DIa9L+PQMlTnOwx/s5ZtUTvx/nSFrNhx4Yppt30QM3m0xsPtaKnc92HS mnvNs/dTZ4EcY9wd+VMwlxUEOOI9IJIGC5qZlh6f3eJuMx7q6Q68yiFUh/mCf2vQ4Q8cE7WK06S sxKQgICNKHgU5BO5szTlIoxYC9n7uu4Xlpdlf0VDPFPjsDLV+gK/bkpTkHirHXP6qRew9nqfg4t ilQ6oHvKLZ2rU/eyZD5bpFL06PLMMkFSNlAZVo4sSlXVpMG7/j/sQJUm4fWjTDIzIZi9Gzqp9Tl o4g6viiNkC49EkHiYKdtjsC3Ib3pczn2pmoTm6q6Vz8N2TCGcFS2CabtiKFKIdzkhRMMFi62u33 2JdLLGvqf0q205Ytt/yYUVQzkezPBRMeqESRUD5PqelX+RkYSaHz0ktt0Awm0Ox2QR4aV7dCohj JBTrq2cR56i3Z/RD43Yz1kqtX1sMVaiC00QKUBDnMp7DfMe6bBcfvKXpwHRNjnvSVD06XfLUkO0 h5lIdUzl6YlPnPYCvpHKxiUWwDBc/i6Dy+gUZfz06k669fkV21AYu3fspJ4Kt64ccqjp0spzr+7 ngqZjikSKjwv0iA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B The core code does not modify the 'struct snd_sof_dsp_ops', stored in 'struct sof_dev_desc'. Make the pointer to 'struct snd_sof_dsp_ops' const to annotate this, make code a bit safer and allow individual drivers to also define this structure as const. Signed-off-by: Krzysztof Kozlowski --- include/sound/sof.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sound/sof.h b/include/sound/sof.h index 05213bb515a3..780c1a755917 100644 --- a/include/sound/sof.h +++ b/include/sound/sof.h @@ -166,7 +166,7 @@ struct sof_dev_desc { /* default firmware name */ const char *default_fw_filename[SOF_IPC_TYPE_COUNT]; - struct snd_sof_dsp_ops *ops; + const struct snd_sof_dsp_ops *ops; int (*ops_init)(struct snd_sof_dev *sdev); void (*ops_free)(struct snd_sof_dev *sdev); }; -- 2.34.1