* [PATCH] drm/bridge: tda998x: Use __be32 for audio port OF property pointer
@ 2026-04-17 15:55 Kory Maincent
2026-04-17 16:19 ` Luca Ceresoli
0 siblings, 1 reply; 3+ messages in thread
From: Kory Maincent @ 2026-04-17 15:55 UTC (permalink / raw)
To: Luca Ceresoli, Kory Maincent (TI.com), Jyri Sarha, Russell King,
dri-devel, linux-kernel
Cc: Bajjuri Praneeth, kernel test robot, thomas.petazzoni,
Russell King, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter
From: "Kory Maincent (TI)" <kory.maincent@bootlin.com>
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 *.
Fixes: 7e567624dc5a4 ("drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604172257.Imo6GOH9-lkp@intel.com/
Signed-off-by: Kory Maincent (TI) <kory.maincent@bootlin.com>
---
drivers/gpu/drm/bridge/tda998x_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
index d9b388165de15..779b976f601c1 100644
--- a/drivers/gpu/drm/bridge/tda998x_drv.c
+++ b/drivers/gpu/drm/bridge/tda998x_drv.c
@@ -1762,7 +1762,7 @@ static const struct drm_bridge_funcs tda998x_bridge_funcs = {
static int tda998x_get_audio_ports(struct tda998x_priv *priv,
struct device_node *np)
{
- const u32 *port_data;
+ const __be32 *port_data;
u32 size;
int i;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drm/bridge: tda998x: Use __be32 for audio port OF property pointer
2026-04-17 15:55 [PATCH] drm/bridge: tda998x: Use __be32 for audio port OF property pointer Kory Maincent
@ 2026-04-17 16:19 ` Luca Ceresoli
2026-04-17 16:40 ` Kory Maincent
0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2026-04-17 16:19 UTC (permalink / raw)
To: Kory Maincent, Jyri Sarha, Russell King, dri-devel, linux-kernel
Cc: Bajjuri Praneeth, kernel test robot, thomas.petazzoni,
Russell King, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter
On Fri Apr 17, 2026 at 5:55 PM CEST, Kory Maincent wrote:
> From: "Kory Maincent (TI)" <kory.maincent@bootlin.com>
>
> of_get_property() returns a pointer to big-endian (__be32) data, but
Where is this stated? of_get_property() is declared as:
| extern const void *of_get_property(const struct device_node *node,
| const char *name,
| int *lenp);
(https://elixir.bootlin.com/linux/v7.0/source/include/linux/of.h#L365-L367)
I don't see __be32 mentioned there.
> 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 *.
>
> Fixes: 7e567624dc5a4 ("drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202604172257.Imo6GOH9-lkp@intel.com/
Wrong link?
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/bridge: tda998x: Use __be32 for audio port OF property pointer
2026-04-17 16:19 ` Luca Ceresoli
@ 2026-04-17 16:40 ` Kory Maincent
0 siblings, 0 replies; 3+ messages in thread
From: Kory Maincent @ 2026-04-17 16:40 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Jyri Sarha, Russell King, dri-devel, linux-kernel,
Bajjuri Praneeth, kernel test robot, thomas.petazzoni,
Russell King, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter
On Fri, 17 Apr 2026 18:19:03 +0200
"Luca Ceresoli" <luca.ceresoli@bootlin.com> wrote:
> On Fri Apr 17, 2026 at 5:55 PM CEST, Kory Maincent wrote:
> > From: "Kory Maincent (TI)" <kory.maincent@bootlin.com>
> >
> > of_get_property() returns a pointer to big-endian (__be32) data, but
>
> Where is this stated? of_get_property() is declared as:
>
> | extern const void *of_get_property(const struct device_node *node,
> | const char *name,
> | int *lenp);
> (https://elixir.bootlin.com/linux/v7.0/source/include/linux/of.h#L365-L367)
>
> I don't see __be32 mentioned there.
It is not stated in the declaration as we don't know the property type but OF
value are always in Big Endian.
And the value is converted later to u8 here:
https://elixir.bootlin.com/linux/v7.0/source/drivers/gpu/drm/bridge/tda998x_drv.c#L1719
Maybe my commit message is a bit inaccurate on this. I can rephrase it if
needed.
> > 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 *.
> >
> > Fixes: 7e567624dc5a4 ("drm/i2c: tda998x: Register ASoC hdmi-codec and add
> > audio DT binding") Reported-by: kernel test robot <lkp@intel.com>
> > Closes:
> > https://lore.kernel.org/oe-kbuild-all/202604172257.Imo6GOH9-lkp@intel.com/
>
> Wrong link?
No, it's just that I fixed the second sparse warnings reported by the kernel
test robot, but maybe quoting this link is wrong.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-17 16:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-17 15:55 [PATCH] drm/bridge: tda998x: Use __be32 for audio port OF property pointer Kory Maincent
2026-04-17 16:19 ` Luca Ceresoli
2026-04-17 16:40 ` Kory Maincent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox