[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01de0157088de0475970c79738284d6c86d702fe.1715526069.git.christophe.jaillet@wanadoo.fr>
Date: Mon, 13 May 2024 19:37:21 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: lgirdwood@...il.com,
broonie@...nel.org,
perex@...ex.cz,
tiwai@...e.com,
cezary.rojewski@...el.com,
pierre-louis.bossart@...ux.intel.com,
peter.ujfalusi@...ux.intel.com,
yung-chuan.liao@...ux.intel.com,
ranjani.sridharan@...ux.intel.com,
kai.vehmanen@...ux.intel.com,
srinivas.kandagatla@...aro.org,
bgoswami@...cinc.com,
daniel.baluta@....com
Cc: linux-sound@...r.kernel.org,
alsa-devel@...a-project.org,
sound-open-firmware@...a-project.org,
linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH 2/6] ASoC: Intel: avs: Constify struct snd_soc_tplg_ops
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
28046 794 0 28840 70a8 sound/soc/intel/avs/topology.o
After:
text data bss dec hex filename
28206 614 0 28820 7094 sound/soc/intel/avs/topology.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
Compile tested-only.
---
sound/soc/intel/avs/topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c
index 02bae207f6ec..35381a835c93 100644
--- a/sound/soc/intel/avs/topology.c
+++ b/sound/soc/intel/avs/topology.c
@@ -1889,7 +1889,7 @@ avs_control_load(struct snd_soc_component *comp, int index, struct snd_kcontrol_
return 0;
}
-static struct snd_soc_tplg_ops avs_tplg_ops = {
+static const struct snd_soc_tplg_ops avs_tplg_ops = {
.io_ops = avs_control_ops,
.io_ops_count = ARRAY_SIZE(avs_control_ops),
.control_load = avs_control_load,
--
2.45.0
Powered by blists - more mailing lists