Re: [PATCH] drm/bridge: tda998x: Use __be32 for audio port OF property pointer

From: Russell King (Oracle)

Date: Mon Apr 27 2026 - 16:39:44 EST


On Fri, Apr 17, 2026 at 05:55:44PM +0200, Kory Maincent wrote:
> From: "Kory Maincent (TI)" <kory.maincent@xxxxxxxxxxx>
>
> of_get_property() returns a pointer to big-endian (__be32) data, but
> port_data in tda998x_get_audio_ports() was declared as const u32 *,
> causing a sparse endianness type mismatch warning. Fix the declaration
> to use const __be32 *.

This is correct.

drivers/of/fdt.c::populate_properties() assigns pp->value to point into
the flattened device tree's data, and the native data format is big
endian.

pp->value = (__be32 *)val;

This pointer is returned by of_get_property().

port_data is read using be32_to_cpup().

So, yes, port_data should have been a __be32 pointer.


> Fixes: 7e567624dc5a4 ("drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding")

This is correct.

> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202604172257.Imo6GOH9-lkp@xxxxxxxxx/

This also look scorrect.

> Signed-off-by: Kory Maincent (TI) <kory.maincent@xxxxxxxxxxx>

Reviewed-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>

Thanks!

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!