From: David Marchand <david.marchand@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>,
Maciej Czekaj <mczekaj@marvell.com>
Subject: Re: [PATCH] base/thunderx: fix build with Gcc 15
Date: Thu, 16 Jan 2025 14:04:33 +0100 [thread overview]
Message-ID: <CAJFAV8woFUuA5i+TBwR7EN1d9bb99d8LwaA8XbcqN4A2mMYZ9A@mail.gmail.com> (raw)
In-Reply-To: <20250110172725.540897-1-stephen@networkplumber.org>
On Fri, Jan 10, 2025 at 6:27 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Gcc 15 now produces warning with the base code of Thunderx driver.
> The issue is that Gcc now defaults to C23 mode, and the standards
> gods have decided that partial initialization of a union has changed.
>
> The fix is to use an empty initializer which forces full initialization.
>
> [2377/3224] Compiling C object drivers/net/thunderx/base/libnicvf_base.a.p/nicvf_mbox.c.o
> In function ‘nicvf_mbox_send_msg_to_pf_raw’,
> inlined from ‘nicvf_mbox_send_async_msg_to_pf’ at ../drivers/net/thunderx/base/nicvf_mbox.c:70:2,
> inlined from ‘nicvf_mbox_cfg_done’ at ../drivers/net/thunderx/base/nicvf_mbox.c:468:2:
> ../drivers/net/thunderx/base/nicvf_mbox.c:59:17: warning: ‘mbx’ is used uninitialized [-Wuninitialized]
> 59 | nicvf_reg_write(nic, mbx_addr, *mbx_data);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/net/thunderx/base/nicvf_mbox.c: In function ‘nicvf_mbox_cfg_done’:
> ../drivers/net/thunderx/base/nicvf_mbox.c:465:24: note: ‘mbx’ declared here
> 465 | struct nic_mbx mbx = { .msg = { 0 } };
> | ^~~
> In function ‘nicvf_mbox_send_msg_to_pf_raw’,
> inlined from ‘nicvf_mbox_send_async_msg_to_pf’ at ../drivers/net/thunderx/base/nicvf_mbox.c:70:2,
> inlined from ‘nicvf_mbox_link_change’ at ../drivers/net/thunderx/base/nicvf_mbox.c:477:2:
> ../drivers/net/thunderx/base/nicvf_mbox.c:59:17: warning: ‘mbx’ is used uninitialized [-Wuninitialized]
> 59 | nicvf_reg_write(nic, mbx_addr, *mbx_data);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/net/thunderx/base/nicvf_mbox.c: In function ‘nicvf_mbox_link_change’:
> ../drivers/net/thunderx/base/nicvf_mbox.c:474:24: note: ‘mbx’ declared here
> 474 | struct nic_mbx mbx = { .msg = { 0 } };
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/net/thunderx/base/nicvf_mbox.c | 42 +++++++++++++-------------
> 1 file changed, 21 insertions(+), 21 deletions(-)
Commit title should be prefixed with: net/thunderx/base.
This file already contains calls to dpdk API, so I guess it is ok to
add more DPDK changes in this base driver source file.
Acked-by: David Marchand <david.marchand@redhat.com>
This build issue is now visible in OBS builds for the main repo, btw.
https://build.opensuse.org/package/live_build_log/home:bluca:dpdk/dpdk/Fedora_Rawhide/ppc64le
--
David Marchand
prev parent reply other threads:[~2025-01-16 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 17:27 Stephen Hemminger
2025-01-16 13:04 ` David Marchand [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=CAJFAV8woFUuA5i+TBwR7EN1d9bb99d8LwaA8XbcqN4A2mMYZ9A@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=mczekaj@marvell.com \
--cc=stephen@networkplumber.org \
/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).