drm/tilcdc: Fix type mismatch
Subsystems (3)
PATCH 1/1 drm/tilcdc: Fix type mismatch
From: "Kory Maincent (TI)" <[email protected]>
cpu_to_be32() returns a __be32 big-endian value, but the compound literals passed to tilcdc_panel_update_prop() were typed as u32. This causes a sparse type mismatch warning. Fix it by using __be32 as the compound literal type to match the return type of cpu_to_be32().
--- drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.c +2 -2
@@ -105,14 +105,14 @@ static int __init tilcdc_panel_copy_props(struct device_node *old_panel,if (!invert_pxl_clk) { ret =tilcdc_panel_update_prop (&ocs, new_timing,"pixelclk-active" , - &(u32 ){cpu_to_be32 (1 )},sizeof (u32)); + &(__be32 ){cpu_to_be32 (1 )},sizeof (__be32));if (ret) goto destroy_ocs; }if (!sync_edge) { ret =tilcdc_panel_update_prop (&ocs, new_timing,"syncclk-active" , - &(u32 ){cpu_to_be32 (1 )},sizeof (u32)); + &(__be32 ){cpu_to_be32 (1 )},sizeof (__be32));if (ret) goto destroy_ocs; }
Signature · 1 line
2.43.0
Quoted 11 lines · Kory Maincent
From: "Kory Maincent (TI)" <[email protected]>
cpu_to_be32()returns a__be32big-endian value, but the compound literals passed totilcdc_panel_update_prop()were typed as u32. This causes a sparse type mismatch warning. Fix it by using__be32as the compound literal type to match the return type ofcpu_to_be32().Reported-by kernel test robot <[email protected]>Fixes 0ff223d991477 ("drm/tilcdc: Convert legacy panel binding via DT overlay at boot time")Signed-off-by Kory Maincent (TI) <[email protected]>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Luca Ceresoli
AppliedQuoted 6 lines · Kory Maincent
cpu_to_be32()returns a__be32big-endian value, but the compound literals passed totilcdc_panel_update_prop()were typed as u32. This causes a sparse type mismatch warning. Fix it by using__be32as the compound literal type to match the return type ofcpu_to_be32().
Applied, thanks!
[1/1] drm/tilcdc: Fix type mismatch
commit: 27a39e135f5c1ceaf73e64648eccdb42b751d5c7
Best regards,
Signature · 1 line
Luca Ceresoli <[email protected]>