[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260106225846.83580-1-ben.dooks@codethink.co.uk>
Date: Tue, 6 Jan 2026 22:58:46 +0000
From: Ben Dooks <ben.dooks@...ethink.co.uk>
To: linux-sound@...r.kernel.org
Cc: lgirdwood@...il.com,
broonie@...nel.org,
linux-kernel@...r.kernel.org,
Ben Dooks <ben.dooks@...ethink.co.uk>
Subject: [PATCH] ASoC: ops: fix pointer types to be big-endian
If manipulating big-endian data, make the pointers be big-endian
instead of host-endian. This should stop the following sparse
warnigns about endian-conversion:
sound/soc/soc-ops.c:547:33: warning: invalid assignment: &=
sound/soc/soc-ops.c:547:33: left side has type unsigned short
sound/soc/soc-ops.c:547:33: right side has type restricted __be16
sound/soc/soc-ops.c:551:33: warning: invalid assignment: &=
sound/soc/soc-ops.c:551:33: left side has type unsigned int
sound/soc/soc-ops.c:551:33: right side has type restricted __be32
Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
---
sound/soc/soc-ops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 624e9269fc25..ba42939d5f01 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -543,11 +543,11 @@ int snd_soc_bytes_get(struct snd_kcontrol *kcontrol,
ucontrol->value.bytes.data[0] &= ~params->mask;
break;
case 2:
- ((u16 *)(&ucontrol->value.bytes.data))[0]
+ ((__be16 *)(&ucontrol->value.bytes.data))[0]
&= cpu_to_be16(~params->mask);
break;
case 4:
- ((u32 *)(&ucontrol->value.bytes.data))[0]
+ ((__be32 *)(&ucontrol->value.bytes.data))[0]
&= cpu_to_be32(~params->mask);
break;
default:
--
2.37.2.352.g3c44437643
Powered by blists - more mailing lists