From patchwork Mon May 13 17:37:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 796553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B988C25B74 for ; Mon, 13 May 2024 17:39:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8583AB65; Mon, 13 May 2024 19:39:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8583AB65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1715621961; bh=mmp/3E5t0JWgl4/OYoYB0/Z3Zg7EBCcBulwzfpIlR2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=tf6lCn0E2qP8w+20Sf2BEbay3dZEeDHKwLIanZz6bfwf/j9214GRHigWBuxnpwS0T o4yakKKUhnLE/9RiUhWzjKRItsPmp5o9hh0HxHL5LjQqy7B3fiYqGZmZ+K0J1dhliW UcZ88OnEiddzRNlXP7T1sdDYTsOX+w0cKr1he20E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D83AF8060C; Mon, 13 May 2024 19:38:01 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C842DF8061F; Mon, 13 May 2024 19:38:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0C284F8025F; Mon, 13 May 2024 19:37:51 +0200 (CEST) Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8677BF8024C; Mon, 13 May 2024 19:37:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8677BF8024C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=wanadoo.fr header.i=@wanadoo.fr header.a=rsa-sha256 header.s=t20230301 header.b=W1sQ4L4K Received: from localhost.localdomain ([86.243.17.157]) by smtp.orange.fr with ESMTPA id 6ZcDs0lh7ME2z6ZcMsL81f; Mon, 13 May 2024 19:37:42 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1715621863; bh=A26Rl7MtM3B51oWgHFeoUVOcPLJ5BY3Z+dYCWIU7CTA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=W1sQ4L4KZKDLj0JG8sMTDYYCXP31N2hT7k41A6sBY2Z8c0LmZkf9HmTV/yO2SncVE fgorRdt1du9JSEGgtxOsjW91X/7ATkARIMK+pmfb4WbV5x5hzRPtusgNdtVHouDF3L OqZrK0UvU6SQ01Fi6g0FG6FOTaZCiJYN0Gf9HnzRQi9gSWxCC0eUxSXeKuAXU4mWy6 4YJe+ZsrlXunh3/sPF2VAAlGiwUES0zAWQEt38sO9Ba/mnlhnzUWeKbsfmSIp373kF bygSM8HADDUbJfdv1hbyvQ+HVlzyFBhQ6LoWuQd0F44GMSmFGRJHgiwtSqXZQVu79B mp4n6S/LpS+PA== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 13 May 2024 19:37:43 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, cezary.rojewski@intel.com, pierre-louis.bossart@linux.intel.com, peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com, daniel.baluta@nxp.com Cc: linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 4/6] ASoC: Intel: Skylake: Constify struct snd_soc_tplg_ops Date: Mon, 13 May 2024 19:37:23 +0200 Message-ID: <48f096b6dc617ecf3ca53211c2a696a4df33b21a.1715526069.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: Q6AYQV6DTEHTZQSXGKF7G47TB4QTGIVA X-Message-ID-Hash: Q6AYQV6DTEHTZQSXGKF7G47TB4QTGIVA X-MailFrom: christophe.jaillet@wanadoo.fr X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Constifying "struct snd_soc_tplg_ops" moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 58844 5282 56 64182 fab6 sound/soc/intel/skylake/skl-topology.o After: text data bss dec hex filename 59004 5122 56 64182 fab6 sound/soc/intel/skylake/skl-topology.o Signed-off-by: Christophe JAILLET Reviewed-by: Amadeusz Sławiński --- Compile tested-only. --- sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index e27f0fc3d897..602ef4321122 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -3470,7 +3470,7 @@ static int skl_tplg_complete(struct snd_soc_component *component) return 0; } -static struct snd_soc_tplg_ops skl_tplg_ops = { +static const struct snd_soc_tplg_ops skl_tplg_ops = { .widget_load = skl_tplg_widget_load, .control_load = skl_tplg_control_load, .bytes_ext_ops = skl_tlv_ops,