Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp140784lqf; Fri, 26 Apr 2024 02:06:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUV+2LVny4GaZeKduQMLT5rmjlWizSfYZIw9r49DjlkUFhBec2WpUUE1oAfah9YKOV4LB2MVVeCj+f+SFUqA6jcQttEHEAVJQiQHvn9cg== X-Google-Smtp-Source: AGHT+IHm5u44yFtObuLO/vVVt4yybGeC66sq6AGuUMxJtA9tXd32Uzf4AMXeUPUzKuDieHaNdxiz X-Received: by 2002:a17:90b:1403:b0:2a2:6244:32b5 with SMTP id jo3-20020a17090b140300b002a2624432b5mr3349460pjb.11.1714122377533; Fri, 26 Apr 2024 02:06:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714122377; cv=pass; d=google.com; s=arc-20160816; b=lIfVv5YpdynFSDZ5qBeffCuRS1FdRxa0t9gZorLBcPgSRGlFs1Ok772vx2ZQaWBG9L bTnwwBK9IgiyWG3QU74imyzulw2sIJIQgQumLC6jtnxyRUq6b4wV09by7JCC9TNHuT8f FUC5SVXfKb9m4T0/RjgjSW0/Jeb5c+mdMhdjN5Fm+TlD8WBja3iKtOqw4eadfF7WdK7S bOhqtxqq8uZrfcaQlc7GltyRH3ugR/qvjE3oBvalyzTketaW/p/TPW0klpv/1IQowTdp UVeaivnC/tlvcH+btpbPKR05nVRPVml8OmjULsgvr2SJuVVvx0aIFFZmb6BB1T5BXcs8 Sq7A== 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=xgIspX/XOWkS6naQW9aOiLZYq8xkVkVkct+K7hYT15Y=; fh=W9yRQyXYGCi9MwVjdCafpvQwWxwBN/xCwbTX3DBdTfE=; b=CknpwbnYbWnu/XDSAC61mTWbYX/VPAa+arrZ9lfPRu4yhqSjGgS9J5HAIwsjAbyx8f XcV4IHCXHMGDNgDtaP/zgKifYcEwhUH+6N6f7VADcoEyle7NskHwv11HpJhRz12/xZrW TjgGpi4btZIsiW6uXHqp7dFBx0vvEFqk2jvCxaPkRG+Vdm8y7qr58ZlVUbZlMMqxIS8H fO8uKdEzOCm2VkSykcqLcBvOtH9Q1v6KrWqJ5QR+pFcXrTjqEhPGAQlDLlP8xAHs1Q8Q K98RAM4pC2VPzIOI/12AQX2kdXPOXyVIQZhl7pI18K3Wtzk49B7VqyQomuODKRaN6ODX jGTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lYpGcZwb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159744-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h8-20020a17090acf0800b002aee1b1d4cbsi5843118pju.137.2024.04.26.02.06.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 02:06:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lYpGcZwb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159744-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 A7F63B2115A for ; Fri, 26 Apr 2024 09:06:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 864AB25605; Fri, 26 Apr 2024 09:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lYpGcZwb" 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 A8D2613C9A0; Fri, 26 Apr 2024 09:05:27 +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=1714122327; cv=none; b=P6/eZ04AnaVrmBuqaD7ODXZZybS+MnC37J97A0hINBD47lz7YvNqOiHZQfovOtFJJ6PtFMda6CMWr4GOfuY9WMYND2WwPXYmy308qZOkZffFGOw4Uq36w7XfomNQYwoeAbILQ1hl3griecS+cfnwGkMsRlQSoYCLWYXX5UmkijI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122327; c=relaxed/simple; bh=VnIAfmPx25oKsEp0zbK0tnxbnzdBHAOYcdVhtoHT55M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ubbTkE5iBBWpcz4xbGWCTn1hhGZ6vz6NXVcjKfZJil1HF6FPyWYBnL6MvacK1DHjE5EhXUYuxSvyt+jj7576UevZJgkN8RMJlezNuWGYj+shZps7QJMBOZvs2B9leCJozS8PFL+Zvs0P75wv9oxAd+86lspGPXd0xX0zGsSn2GQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lYpGcZwb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F82AC2BD11; Fri, 26 Apr 2024 09:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122327; bh=VnIAfmPx25oKsEp0zbK0tnxbnzdBHAOYcdVhtoHT55M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lYpGcZwbD++CwmC8RWqhElXVo952m5WjDHqKUqH3kLu2tpnsh/j90pgBBj3pd02pY eCyM7knZlW4cjURhR5UmE2fDAgQ1K8T09MqwUdk1+fR6lqehvBJK7OqE+h/c2lf2bS ISofovYCA2bDcFv0CPVCfNwgUWFSY/W53iH82l9eMxEeaw7QqAlyS9Y0Ri3WXYY8yN EBoWE0XMHycjXYaHVYyPv5Yi72aoojICxP1pRBRqRas5ld7+D5XCwwQgqhCPmxUFh1 3KSQEOLxlofSYbE38KDnEqvqu1Vvq+wX7anoJ5El0iReGSqy7FI6Z22H6+j1H/n4NA LTatyohdFI3uw== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:51 +0200 Subject: [PATCH v2 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: <20240426-n-const-ops-var-v2-4-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=937; i=krzk@kernel.org; h=from:subject:message-id; bh=VnIAfmPx25oKsEp0zbK0tnxbnzdBHAOYcdVhtoHT55M=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24i5ldgk6ROfX3AbXjO+oI6liBQKOT8EK72p kq6RFuYidqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituIgAKCRDBN2bmhouD 14UsD/0XY1oHKwddmpwGMp3fZbl8ZR4Yf1LvsKEzZAEwVg8Dnef8Ow3zrhLy2YP3NjWoFTKLfEF 1eppLLdVNgIJphOhDh2zBCrF869W2O9Zd9OZQ3IIxZP91wgv6XKwNsaDCtYNavh9+/dLrDasQPP vIvah0BERFKIqXDqIo5g7pPNc4tszzsMA5TJhOKj7+yb5pCj2Jxcl0U+RuZJ8DTwKg5stb2WJOY zxTXX6Mj/NQagvsACTBILxPBPQNI2QUHvsk1fY7NCB0aMbpCiySZ6M1q/wkF8StCruiU1h3SbwQ DX5AGhQAsK7SIjzkXpkYOw6xqhM3RdC10DYUYk9Fg1+5xXrzVdechRI8GGpYcQ6zemKw6dmSqDX kmY9p5Zp7u+kj4lQGy9ZhDAlKeAQ2QDRcopZZzGVkFCix3fxteHQh1DCaklr/D8Npbtxv3nxbJh VhsNL0haC44Mdk4BAUwLioHcHEs5JOlC8A0meDqjsrYNrwep/N4Xmkxns91MRcVYxtFQzf0N7Nq vITemvqkZ9sJhS3nssaIVR+3j38/AurpPzl4fY5bKN+QN0yAvHDfOfkR2Q7ofNCFgEX9o6ULIIN lieNArQ4cwd2etxJFmftDi3/2rkkYSmUVGXcypwxEQpV8Mi6dtAFtCZ8clIRvZsyzPzJBqNX+E7 iA/exbAmcYlKYxg== 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. Tested-by: Pierre-Louis Bossart 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.43.0