Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp140478lqf; Fri, 26 Apr 2024 02:05:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtS5OI73dkWOyuBwBTBFJFSwM9tEpFn/uemVborekYyfECddnEgelgMxK4QYrPzyC/RnEaEZlLpuKtv1zHUR+TUwMwAUyuMRya6q6Gfw== X-Google-Smtp-Source: AGHT+IGy/E5hPYOnF6y7dDQcXSdS5aymiFEb4pSZj6jOlCDThX7Nj6maeyMD2/RAExo7Y2oTmEtT X-Received: by 2002:a50:f692:0:b0:56e:edc:9837 with SMTP id d18-20020a50f692000000b0056e0edc9837mr2043400edn.35.1714122333048; Fri, 26 Apr 2024 02:05:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714122333; cv=pass; d=google.com; s=arc-20160816; b=hOa9b6e1e3YLkRohwHcQWtQiODyF5LjFK51NC9VVDT2KSHBIDcsVOi7v8w4wUHo6Md Y4fBvhJh+Tb/eRlv1ql/+Og2g4RqHH/BIgnXiBRVr7LP00eLjzg8nPvDIahgHGt3CDA8 hOrZxZGD5smeiP9HpByQBQQ8txpeWy5horlCD981WtqttEfCLwkXmlVO63jlsxnosGRy bIvgaIDMG6vWEA2o9ujpW8VBNnUWv5KI94+txhd7Gyx8OFrKbwIdoPUUC2uZ/wPEXdOn HK/F7YwSPVxRQflaTYJ+er1C43rAljmrugVdJOflaHKkdmw6McUiJcA6Y5/W9ovLrUNZ h75w== 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=jqOnOVcQ1VQv2uN0g2XWIg4pk7Bl59XG/VYIpaiU/Yo=; fh=W9yRQyXYGCi9MwVjdCafpvQwWxwBN/xCwbTX3DBdTfE=; b=nldnZu3SRQaLfmTXH8vJ02bRI8EbuQvHphLTZ3CH7CbcgdJoXZC0fpva0oVywk/Iq5 hWFZkR6jjW+gSfY+1w7ec0baK4OStU2wVhxK+7nkixdFxVzZFI7fc1/GAsjrIsMTIN2C eo+3k4hrRnrjjbfZySPT8u9aWRkPNMBnBQcu+/tXFPH6zQJ31N9Kb5ZF3bwiPpy9RhDR XILNvwlFy4uByGLskkUSonItKsRvqqjT71NXz+iCHCyGdjfNaQmGtYKqAs//U/P/qgRj N7NqH1TY650AHNFuVncW6gqRZV3lqUOn6oJh/xSTj+TJi1p3SV31tjGq8hMkdCymJYWN tXOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oIPZ6uWA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n11-20020aa7c44b000000b005702155d7e8si10373044edr.10.2024.04.26.02.05.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 02:05:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oIPZ6uWA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159742-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BEA8D1F229C1 for ; Fri, 26 Apr 2024 09:05:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D666513D8B6; Fri, 26 Apr 2024 09:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oIPZ6uWA" 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 045CB13D525; Fri, 26 Apr 2024 09:05:10 +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=1714122311; cv=none; b=CQl0aoJlRHSgm86OK/+ooSf1TqvMSuQTfCZjeIxFyVQ8hKoJ3wTvHcRvbPXwi/1jfcArvnppnTJ4l/YyauXYmT7WCsX7J28t8W6PAv14No6jY6n/hAvSHdqmgkY+5jUHlInIIfenmb/cqmMCGbzFtvuBfgyH6oyynlJbQoLugz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122311; c=relaxed/simple; bh=kMKFC78mUGsx7b4RHA9dgG2P9NgMyAE/GAkkgSE6250=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KU67ygZ++Dji9qUdxj+8BYBezhg5D1gULCPLGPxOl95YKekk/WFgr7zd3XAPROuQzy25STyYf5Oe2y8BL1WFq4+nN/MtLxwMIFvBBzt/GDNmX2OGqA/ru+bfz2NJa6Xm1QeAoM8zHJLEo20HmFQ9TJ5nwrnzhRhDc4Edkzo2rIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oIPZ6uWA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 697AFC2BD11; Fri, 26 Apr 2024 09:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122310; bh=kMKFC78mUGsx7b4RHA9dgG2P9NgMyAE/GAkkgSE6250=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=oIPZ6uWA+7TAMJi5kEuM/QMn5Xj7GZcVcS4jfZUyrybC3B5RUkm0r41Y94kj2UlKe NCauoMyJ99LhvzuqUSRvbw3EjpSleAl9VtS2G1/4TrpQ96F2hopqotiX/Ekrc8jvmR bFJ9VmS275AJqTTCF6MhieA5S+J32U0Wm5MDDSq5UEP81eikF7gudnaK86bj3rt3+b kCupQ7GYzmDzFMQO8X4XqE+k0Fs+XDLwE1qiD1Qe6jXbfoMtdcqMHZtxj51+5BtBYm q7sV5zYA4RpFkxuFNCQBMvenhIoxEOF/ClIMeZn2PMMx7AICAmTKkEhl/dsvoKrkfu /ohdvwW3vwARg== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:49 +0200 Subject: [PATCH v2 02/14] ASoC: SOF: ipc3: Constify local 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-2-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=1682; i=krzk@kernel.org; h=from:subject:message-id; bh=kMKFC78mUGsx7b4RHA9dgG2P9NgMyAE/GAkkgSE6250=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24gEkNhUhWWsVLmkCo5awt/BmsQBJfrhkCY9 PLPy73pbimJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituIAAKCRDBN2bmhouD 17EzD/9EYcZQxibgKh8DZYlhMIakLJyrdMkfUJ1Xh20O3OImR+/jABppKN4idGJ9tC+Eg2KLf/5 gZHfQ6chMJMrkoHDuJgTvUfA0MSrNRYAml3SRrR9NZ/d/k2fJzUihUBSE6gzNuk1W/O/b1CVUIF 56tPqCL5GfMnSmAiML88KaUn8w25LrBR+0FhrhtaWkVp3IbJai/BrbGoqn/x2+oaUyEFUyFPW12 H4d8iLSwnY4BD5TF1bjz9m89O0DU4fnmd4ZXGPUUwZKqi7+8ndp0McjvFdkQWHtk1HlWFGn/NJK zwwq3sdDoz1PUmH2QDwd2og6WNyPlhgteWMwzuJSM/E7PZENLIJmPWiEsgS/76f9twTZ1FXikyf CG3wIS7oDgkqPqKtnoREkS26u2d4c9jr6lumZ/YlxxyP4HWt47Tw/3zNkDeja/NkZfbx99fLsNg l1pjvn337YhGH/qv60QcyMdeox5bJIvdL5tQXCnrVp3YT9tUddClpvy/Hv9K7MS0jfwx7QeDi5s NdamksfVQEgvNeCMYJGuNxfPQnwstIqthv9gl/sF119u9txU1oe+15HiurhvXLwlmuo8riAG+hp I11Av7Usd134ko2qIJuNgYGLt0kgV1zShCkTEmm4nT/jJVhLlRYGBZ8TEvTg21g3djM7cicmu2a 5X/3Z3y/SJRqFyA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. Tested-by: Pierre-Louis Bossart Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/ipc3-priv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/ipc3-priv.h b/sound/soc/sof/ipc3-priv.h index 0bbca418e67e..9cd7794f3cb6 100644 --- a/sound/soc/sof/ipc3-priv.h +++ b/sound/soc/sof/ipc3-priv.h @@ -36,7 +36,7 @@ static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmatb, struct sof_ipc_dma_trace_params_ext *dtrace_params) { - struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; + const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; if (dsp_ops->trace_init) return dsp_ops->trace_init(sdev, dmatb, dtrace_params); @@ -46,7 +46,7 @@ static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev, static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev) { - struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; + const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; if (dsp_ops->trace_release) return dsp_ops->trace_release(sdev); @@ -56,7 +56,7 @@ static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev) static inline int sof_dtrace_host_trigger(struct snd_sof_dev *sdev, int cmd) { - struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; + const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; if (dsp_ops->trace_trigger) return dsp_ops->trace_trigger(sdev, cmd); -- 2.43.0