Thread (6 messages) 6 messages, 3 authors, 2021-09-06

linux-next: build warning after merge of the kspp tree

From: Stephen Rothwell <hidden>
Date: 2021-08-30 08:44:34
Also in: lkml

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

drivers/gpu/drm/kmb/kmb_plane.c:135:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
  135 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
      |                       ^~~~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:132:20: warning: array subscript 2 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
  132 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
      |                       ^~~~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:129:20: warning: array subscript 1 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
  129 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL2_ENABLE;
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
      |                       ^~~~~~~~~~~~

Exposed by commit

  656256c0d67c ("Makefile: Enable -Warray-bounds")

Introduced by commit

  7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display")

from v5.11-rc1.
-- 
Cheers,
Stephen Rothwell

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help