mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
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>
This commit is contained in:
parent
3c0ebc4c07
commit
72e91bba11
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user