aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2026-08-22 11:43:08 +0200
committerHelge Deller <deller@gmx.de>2026-08-24 13:24:37 +0200
commit72e91bba1190c91c76ef2f81476399eb66b87ed2 (patch)
treeb12f5e215f71b40dd7c11380f92f3fd0a4568448
parentvt: hide cursor prior to font changes to avoid out-of-bound reads (diff)
fbdev: omapfb: Fix __be32 sparse warning in panel_enabled()
This commit resolves a sparse warning in panel_enabled() by explicitly reading the display status into a __be32 variable. It then converts this value to CPU endianness using __be32_to_cpu() before checking the bits. This should fix this sparse warning: ../omapfb/displays/panel-sony-acx565akm.c:218:23: sparse: sparse: cast to restricted __be32 Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202608211811.lps93xao-lkp@intel.com/ Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
index 8f430d9e8054..0202ca8cbfc2 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
@@ -210,12 +210,13 @@ static void set_display_state(struct panel_drv_data *ddata, int enabled)
static int panel_enabled(struct panel_drv_data *ddata)
{
+ __be32 disp_status_be;
u32 disp_status;
int enabled;
acx565akm_read(ddata, MIPID_CMD_READ_DISP_STATUS,
- (u8 *)&disp_status, 4);
- disp_status = __be32_to_cpu(disp_status);
+ (u8 *)&disp_status_be, 4);
+ disp_status = __be32_to_cpu(disp_status_be);
enabled = (disp_status & (1 << 17)) && (disp_status & (1 << 10));
dev_dbg(&ddata->spi->dev,
"LCD panel %senabled by bootloader (status 0x%04x)\n",