Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@codethink.co.uk>
Link: https://patch.msgid.link/20260106225846.83580-1-ben.dooks@codethink.co.uk
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Ben Dooks and committed by
Mark Brown
2fa0eaf7 f33db67d

+2 -2
+2 -2
sound/soc/soc-ops.c
··· 543 543 ucontrol->value.bytes.data[0] &= ~params->mask; 544 544 break; 545 545 case 2: 546 - ((u16 *)(&ucontrol->value.bytes.data))[0] 546 + ((__be16 *)(&ucontrol->value.bytes.data))[0] 547 547 &= cpu_to_be16(~params->mask); 548 548 break; 549 549 case 4: 550 - ((u32 *)(&ucontrol->value.bytes.data))[0] 550 + ((__be32 *)(&ucontrol->value.bytes.data))[0] 551 551 &= cpu_to_be32(~params->mask); 552 552 break; 553 553 default: