From: David Marchand <david.marchand@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, stable@dpdk.org, Rasesh Mody <rmody@marvell.com>,
Devendra Singh Rawat <dsinghrawat@marvell.com>
Subject: Re: [PATCH] net/qede/base: fix 32-bit build with GCC 12
Date: Wed, 5 Oct 2022 21:28:32 +0200 [thread overview]
Message-ID: <CAJFAV8wJb=+7p4WTnVASdD2X2uahy8TUrHMUBiYLEjKbJgRspQ@mail.gmail.com> (raw)
In-Reply-To: <20221004111811.1502920-1-thomas@monjalon.net>
On Tue, Oct 4, 2022 at 1:18 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> A pointer is passed to a macro and it seems mistakenly referenced.
> This issue is seen only when compiling with GCC 12 for 32-bit:
>
> drivers/net/qede/base/ecore_init_fw_funcs.c:1418:25:
> error: array subscript 1 is outside array bounds of ‘u32[1]’
> {aka ‘unsigned int[1]’} [-Werror=array-bounds]
> 1418 | ecore_wr(dev, ptt, ((addr) + (4 * i)), \
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1419 | ((u32 *)&(arr))[i]); \
> | ~~~~~~~~~~~~~~~~~~~
> drivers/net/qede/base/ecore_init_fw_funcs.c:1465:17:
> note: in expansion of macro ‘ARR_REG_WR’
> 1465 | ARR_REG_WR(p_hwfn, p_ptt, addr, pData, len_in_dwords);
> | ^~~~~~~~~~
> drivers/net/qede/base/ecore_init_fw_funcs.c:1439:35:
> note: at offset 4 into object ‘pData’ of size 4
> 1439 | u32 *pData,
> | ~~~~~^~~~~
>
> Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0")
> Cc: stable@dpdk.org
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reproduced and tested build fix.
Tested-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
next prev parent reply other threads:[~2022-10-05 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 11:18 Thomas Monjalon
2022-10-05 19:28 ` David Marchand [this message]
2022-10-06 10:27 ` Thomas Monjalon
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='CAJFAV8wJb=+7p4WTnVASdD2X2uahy8TUrHMUBiYLEjKbJgRspQ@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dsinghrawat@marvell.com \
--cc=rmody@marvell.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).