summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2021-10-25 20:59:26 +0200
committerMark Brown <broonie@kernel.org>2021-10-27 12:31:09 +0200
commit1baad7dad115ea3976fb5e5d0e3f3bec83dfd7ca (patch)
treeaeb34858a2547d4a5eefb4a7f86a52723ccaee11 /sound
parentMerge series "ASoC: cs42l42: Fixes to power-down" from Richard Fitzgerald <rf... (diff)
downloadlinux-1baad7dad115ea3976fb5e5d0e3f3bec83dfd7ca.tar.xz
linux-1baad7dad115ea3976fb5e5d0e3f3bec83dfd7ca.zip
ASoC: topology: handle endianness warning
Sparse reports the following warning: sound/soc/soc-topology.c:1488:26: error: restricted __le32 degrades to integer Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211025185933.144327-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 88f849b119da..7a4559ddf903 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1485,7 +1485,7 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
if (!kcontrol_type)
goto err;
- for (i = 0; i < w->num_kcontrols; i++) {
+ for (i = 0; i < le32_to_cpu(w->num_kcontrols); i++) {
control_hdr = (struct snd_soc_tplg_ctl_hdr *)tplg->pos;
switch (le32_to_cpu(control_hdr->ops.info)) {
case SND_SOC_TPLG_CTL_VOLSW: