Hi all, After merging the kspp tree, today's linux-next build (powerpc allyesconfig) failed like this: drivers/gpu/drm/kmb/kmb_plane.c: In function 'kmb_plane_atomic_disable': drivers/gpu/drm/kmb/kmb_plane.c:165:34: error: array subscript 3 is above array bounds of 'struct layer_status[2]' [-Werror=array-bounds] 165 | 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:61:41: note: while referencing 'plane_status' 61 | struct layer_status plane_status[KMB_MAX_PLANES]; | ^~~~~~~~~~~~ drivers/gpu/drm/kmb/kmb_plane.c:162:34: error: array subscript 2 is above array bounds of 'struct layer_status[2]' [-Werror=array-bounds] 162 | 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:61:41: note: while referencing 'plane_status' 61 | struct layer_status plane_status[KMB_MAX_PLANES]; | ^~~~~~~~~~~~ Exposed by commit 4ba545781e20 ("Makefile: Enable -Warray-bounds") Originally introduced by commmit 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Maybe should have been fixed by c026565fe9be ("drm/kmb: Enable alpha blended second plane") I have applied the following hack for now. From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Date: Tue, 25 Jan 2022 13:45:26 +1100 Subject: [PATCH] hack for building with -Warray-bounds Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> --- drivers/gpu/drm/kmb/kmb_plane.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/kmb/kmb_plane.c b/drivers/gpu/drm/kmb/kmb_plane.c index 00404ba4126d..c12e900c6c93 100644 --- a/drivers/gpu/drm/kmb/kmb_plane.c +++ b/drivers/gpu/drm/kmb/kmb_plane.c @@ -161,9 +161,11 @@ static void kmb_plane_atomic_disable(struct drm_plane *plane, case LAYER_2: kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE; break; +#if 0 case LAYER_3: kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE; break; +#endif } kmb->plane_status[plane_id].disable = true; -- 2.34.1 -- Cheers, Stephen Rothwell
Attachment:
pgp0ZEwkRONyc.pgp
Description: OpenPGP digital signature