Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp140872lqf; Fri, 26 Apr 2024 02:06:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW2UllY9ZdCBNHvCKKgJmyZZefZQA4i1zXUq88TfdwScW015PLeAYpV0pvBKU/u26ijpURS1HP3UTBaDGUxxJEVgb7hOxH7dOj3krN5cw== X-Google-Smtp-Source: AGHT+IE2LEeYF4KWrMai4qW6ZI9rOZ5svjPsXLF08A/hF/hOsFGT4/EnkDOX8UN5Cvor4MtDq8Ax X-Received: by 2002:a17:906:2bcd:b0:a58:cd39:d154 with SMTP id n13-20020a1709062bcd00b00a58cd39d154mr809918ejg.11.1714122388454; Fri, 26 Apr 2024 02:06:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714122388; cv=pass; d=google.com; s=arc-20160816; b=exbYaJly0y13qzTgWr5zEHSaPke5ylOh3MCyXOrks1hgcw06XKxAjg1nmC3nR/+KrM W0aUSeMzvfigZnJdq0iAStcKzJAo0YwQrgGhE4Qpz/mxLMce74wciaSMm1dS4gB3qEHz /bR3EAOJs7T4Jp5y8sOVvd1yZWNs6t9KsmDUoWrJpZ7Ql4pondswGYommKyn8Sw/qvd5 N1zyJnoJOWpyipZlIsQlPMw/mu3/DvXgAxd8sp6L9ixtlnCng/dvq4I5SPbnMpeZnRZ0 6h0F9pEdrNIM1GIGO+bW5Dfug2G6url3px8bRFVBFsnEyGNpnR1ugCrvN/JptLEn1eYe T1cA== 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=y8+wwGEzivAG5cCa6MPrmm9hM1tZ8MyShr6Qgsl/mdw=; fh=W9yRQyXYGCi9MwVjdCafpvQwWxwBN/xCwbTX3DBdTfE=; b=rOoxsBWn6bwkJjbcieY6NrgFWkA93FEbsEi8on++LdwrE6YLaDAP1GNfcvMENrQohW wwQ73t2Z0x6hWMlyZ09GqkGZu4emb677Tuy0C5wYhuWXSSMyuRNUZx93ZCLr8x1Z5Jmu CLKLd3AAR6VAmpbwmnmlSzjwHZ5Qjqww8+HxsmTvWNWmdR5JQoZV78WUWVmsXRTtcMoK zUbKKLkHuXIZ+91HAoANbRMhs1hwrO94Z+bwU+xcljBcwxabRekxDJ3NwMNxFyldPsyL GFKbROnA1MeGxqC5rfnBbMK4SkRBL/fLMzWk/na5vZ/xy7VW+7e9kFY9dewnrb4s4rKP DCJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XJuPY7xn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159746-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159746-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 sh43-20020a1709076eab00b00a55766fce3bsi11448313ejc.111.2024.04.26.02.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 02:06:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159746-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=XJuPY7xn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159746-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159746-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 2C59D1F2284E for ; Fri, 26 Apr 2024 09:06:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98B2013F440; Fri, 26 Apr 2024 09:05:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XJuPY7xn" 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 BD1FB13D299; Fri, 26 Apr 2024 09:05:42 +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=1714122342; cv=none; b=jpbbIhTC+3765Ph4jv+EG+K2giQBE3aWOUSTAEDIuFDFq2yqOkkdCev1Ub9d8MdRejqNheGoidZZGk32QbF12Nbn/EUxJxHWcmyBPVfYicVQVFqec85+HKruaQ3esufRyuTpK8oTMoG5jpioVZPwXMSpoPynj05IupG2QXtx1MU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122342; c=relaxed/simple; bh=uSl9lHVhMhzqO5BXxIg9ZVHN/ovpA4vPraemkZEX5Es=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SK9z5VLZrZqRwQNNeoX2uv8RpdIEk1ho4zhVWJrJ01bSqSGNqmn0ZjNTPoJgXIFR6yD4yPTVQUsCNhx2RffoOwKPr3kK0B0pbxpmKIVlgHCpyDp7gZQGgXxrYASgXZ/uaZ9k4g5K6Zus+8xfgNpBF77D2YdShHmQKE5I8EW1HYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XJuPY7xn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2480EC2BD10; Fri, 26 Apr 2024 09:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122342; bh=uSl9lHVhMhzqO5BXxIg9ZVHN/ovpA4vPraemkZEX5Es=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XJuPY7xnJUG2dzuMuGAdf4kyeZY7M7fYQjmDTKiPN/ajF3y3nszsFvN+tkNNZ8iAC 0GoYRlbA8WaRguZ79eeYw/qOj1e2Pl2gaSaGVT2oX8GBHsj5veYRklqp3amBhwQMkt AJwGXp1PlCBqLWBcWdu697dfCaGRG7EZfUcnwibVpB12LOxrCuUWAyRAGLFurnxLZq fOO7s2vOFVb9qmM8P23pCIv6q7BNFDbdvf2xaZqP4/QsDZCxroqJ6o5iTorKYUtgn8 IAz8DW1EyjNTvdisltC+7e42xsMixFB4PSkhsUwNZGR74D4kOCJQWEJEdqsJMph0jT zaUpu9rMxE/ng== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:53 +0200 Subject: [PATCH v2 06/14] ASoC: SOF: intel: hda: Constify 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-6-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=1399; i=krzk@kernel.org; h=from:subject:message-id; bh=uSl9lHVhMhzqO5BXxIg9ZVHN/ovpA4vPraemkZEX5Es=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24kIwXwjcILq4oTHU0GmodP7uXY1EGskkxrG kPPOLG9cu6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituJAAKCRDBN2bmhouD 1/vID/94le4u7Mr/ZXMzNfG1RttG6ySshfgZ+i+gW5oeYZMWtcjv4vBVFDDh6e6C7bgwNPGxnJi en52qMwbnDb1d3xMNM0PAX/enkLznKz7jioV5V9QrmyOq0gZghU0lHvIPj7n38wFBnLH+T0YIbu PhSFiHHUSwmh1rK3+FRyxH2jNRrlK21TRKLDrsDQg2TmQHUHm92kZWZ4kKSscJW1vKRok4+8QBN oymMJyFTaLdgJ7QrMnaorTkJSd30SaTKw/Wb2g8Vh7+1bLxtpL2KT/ZsC8MkMBH1C0Ur0J72Hxy cqAkWq39UMY1DzcEKBkZEro6DtTlIGu/NTq4LPwVny+uIyic+1s8pXijWTDv+Gkt3IqduNJtgN2 sgO9DfXUNig+e2OgtmiBR9Rkc1zZKJzuxrbKpHW446h2Ju6TqoqQpdqEfs5D0Mn+CU74qdbXyQQ yO9zWhU89QHztLVbD8I3BvzqHccHdNNxztyWFBScd2xJCMsDtOyIdWj2ZJ7OYgHXiLjcsYyQejs x9CBWz4fk3R7cCWYV0Fjz+IFhXXmbSSSTjBqVIEEu/0Cjy5UZhWfTabJvG50EyrwUoynQqVyuU9 it2S3jqr84dVJ/of1XXbvrzdfPDxmWeYojacs3pRoidiPS9D+EPFAycuRPmWKmrbqj/DNf2zW8X vxnu7veStIRiIJg== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/intel/hda-common-ops.c | 2 +- sound/soc/sof/intel/hda.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-common-ops.c b/sound/soc/sof/intel/hda-common-ops.c index d71bb66b9991..466769c68da5 100644 --- a/sound/soc/sof/intel/hda-common-ops.c +++ b/sound/soc/sof/intel/hda-common-ops.c @@ -14,7 +14,7 @@ #include "hda.h" #include "../sof-audio.h" -struct snd_sof_dsp_ops sof_hda_common_ops = { +const struct snd_sof_dsp_ops sof_hda_common_ops = { /* probe/remove/shutdown */ .probe_early = hda_dsp_probe_early, .probe = hda_dsp_probe, diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index b59d1a572bce..7804c5b50c26 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -874,7 +874,7 @@ int hda_dsp_dais_suspend(struct snd_sof_dev *sdev); /* * Platform Specific HW abstraction Ops. */ -extern struct snd_sof_dsp_ops sof_hda_common_ops; +extern const struct snd_sof_dsp_ops sof_hda_common_ops; extern struct snd_sof_dsp_ops sof_skl_ops; int sof_skl_ops_init(struct snd_sof_dev *sdev); -- 2.43.0