From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, wg@grandegger.com, linux-can@vger.kernel.org
Subject: Re: [PATCH net-next] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning
Date: Mon, 23 May 2022 22:12:14 +0200 [thread overview]
Message-ID: <20220523201214.b5lhtarbi47my725@pengutronix.de> (raw)
In-Reply-To: <20220523121425.y5ca3ok5r2hxgh7j@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
On 23.05.2022 14:14:25, Marc Kleine-Budde wrote:
> On 20.05.2022 12:46:59, Jakub Kicinski wrote:
> > This driver does a lot of casting of smaller buffers to
> > struct kvaser_cmd_ext, GCC 12 does not like that:
> >
> > drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c:489:65: warning: array subscript ‘struct kvaser_cmd_ext[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Warray-bounds]
> > drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c:489:23: note: in expansion of macro ‘le16_to_cpu’
> > 489 | ret = le16_to_cpu(((struct kvaser_cmd_ext *)cmd)->len);
> > | ^~~~~~~~~~~
> >
> > Temporarily silence this warning (move it to W=1 builds).
> >
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > ---
> > Hi Marc, are you planning another -next PR? Can we take this
> > directly?
>
> Thanks, applied and I'll send a -next PR soonish.
Available here:
https://lore.kernel.org/all/20220523201045.1708855-1-mkl@pengutronix.de/
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-05-23 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 19:46 [PATCH net-next] can: kvaser_usb: silence a GCC 12 -Warray-bounds warning Jakub Kicinski
2022-05-23 12:14 ` Marc Kleine-Budde
2022-05-23 20:12 ` Marc Kleine-Budde [this message]
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=20220523201214.b5lhtarbi47my725@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wg@grandegger.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).