All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 1/8] ASoC: topology: handle endianness warning
Date: Mon, 25 Oct 2021 13:59:26 -0500	[thread overview]
Message-ID: <20211025185933.144327-2-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20211025185933.144327-1-pierre-louis.bossart@linux.intel.com>

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>
---
 sound/soc/soc-topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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:
-- 
2.25.1


  reply	other threads:[~2021-10-25 19:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 18:59 [PATCH 0/8] ASoC: minor cleanup of warnings Pierre-Louis Bossart
2021-10-25 18:59 ` Pierre-Louis Bossart [this message]
2021-10-25 18:59 ` [PATCH 2/8] ASoC: rt5682s: use 'static' qualifier Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 3/8] ASoC: nau8821: fix kernel-doc Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 4/8] ASoC: nau8821: clarify out-of-bounds check Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 5/8] ASoC: mediatek: remove unnecessary initialization Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 6/8] ASoC: mediatek: mt8195: rename shadowed array Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 7/8] ASoC: mediatek: mt8195: fix return value Pierre-Louis Bossart
2021-10-25 18:59 ` [PATCH 8/8] ASoC: rockchip: i2s_tdm: improve return value handling Pierre-Louis Bossart
2021-10-27 17:29 ` [PATCH 0/8] ASoC: minor cleanup of warnings Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211025185933.144327-2-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.