On Fri, Jan 10, 2025 at 6:27 PM Stephen Hemminger
<step...@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 <step...@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.march...@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

Reply via email to