LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Kees Cook <keescook@chromium.org>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Anitha Chrisanthus <anitha.chrisanthus@intel.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: linux-next: build warning after merge of the kspp tree
Date: Mon, 6 Sep 2021 15:41:51 +1000	[thread overview]
Message-ID: <20210906154151.0aa41a7a@canb.auug.org.au> (raw)
In-Reply-To: <20210830184429.1ee4b4d8@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]

Hi all,

On Mon, 30 Aug 2021 18:44:29 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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.

Due to Linus -Werror, these are now errors :-(

I have reverted commit 656256c0d67c for now.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2021-09-06  5:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30  8:44 Stephen Rothwell
2021-08-30 23:50 ` Kees Cook
2021-08-31  0:49   ` Stephen Rothwell
2021-09-06  5:41 ` Stephen Rothwell [this message]
2021-09-06 17:06   ` Kees Cook
2021-09-06 17:12     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210906154151.0aa41a7a@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=anitha.chrisanthus@intel.com \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: linux-next: build warning after merge of the kspp tree' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).