From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Ben Dooks <ben.dooks@codethink.co.uk>
Cc: Maciej Strozek <mstrozek@opensource.cirrus.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: SDCA: fix __leXX types in find_sdca_control_range
Date: Mon, 22 Jun 2026 16:14:11 +0100 [thread overview]
Message-ID: <ajlRQyIq9kvJdQWf@opensource.cirrus.com> (raw)
In-Reply-To: <20260622134247.465275-1-ben.dooks@codethink.co.uk>
On Mon, Jun 22, 2026 at 02:42:47PM +0100, Ben Dooks wrote:
> The find_sdca_control_range passes u16 and u32 values to the
> leXX_to_cpu() functions. Change this type and for the data
> loop use the le32_to_cpup() to convert the value using a
> pointer.
>
> Fixes the following sparse warnings:
> sound/soc/sdca/sdca_functions.c:868:23: warning: cast to restricted __le16
> sound/soc/sdca/sdca_functions.c:869:23: warning: cast to restricted __le16
> sound/soc/sdca/sdca_functions.c:877:34: warning: cast to restricted __le32
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> for (i = 0; i < num_range; i++)
> - range->data[i] = le32_to_cpu(range->data[i]);
> + le32_to_cpup((__le32 *)&range->data[i]);
Sorry looking again is this bit right? I think this works because
my system is little endian so this is a no op, but don't you
still need to assign the value here? Or use le32_to_cpus()?
Thanks,
Charles
prev parent reply other threads:[~2026-06-22 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 13:42 [PATCH] ASoC: SDCA: fix __leXX types in find_sdca_control_range Ben Dooks
2026-06-22 14:28 ` Charles Keepax
2026-06-22 15:14 ` Charles Keepax [this message]
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=ajlRQyIq9kvJdQWf@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=ben.dooks@codethink.co.uk \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mstrozek@opensource.cirrus.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/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.