From: Saeed Mahameed <saeed@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3][next] net/mlx5e: Avoid a hundred -Wflex-array-member-not-at-end warnings
Date: Thu, 27 Feb 2025 14:29:00 -0800 [thread overview]
Message-ID: <Z8DnLGnhV3WxpHyW@x130> (raw)
In-Reply-To: <69815658-68cd-46cf-bca1-81119bbdb49a@embeddedor.com>
On 27 Feb 12:06, Gustavo A. R. Silva wrote:
>
>>>
>>>-struct mlx5e_umr_wqe {
>>>+struct mlx5e_umr_wqe_hdr {
>>> struct mlx5_wqe_ctrl_seg ctrl;
>>> struct mlx5_wqe_umr_ctrl_seg uctrl;
>>> struct mlx5_mkey_seg mkc;
>>>+};
>>>+
>>>+struct mlx5e_umr_wqe {
>>>+ struct mlx5e_umr_wqe_hdr hdr;
>>
>>You missed or ignored my comment on v0, anyway:
>>
>>Can we have struct mlx5e_umr_wq_hdr defined anonymously within
>>mlx5e_umr_wqe? Let's avoid namespace pollution.
>
>I thought your comment was directed to Jabuk.
>
>I don't see how to avoid that and at the same time changing
>the type of the conflicting object and fix the warnings:
>
>- struct mlx5e_umr_wqe umr_wqe;
>+ struct mlx5e_umr_wqe_hdr umr_wqe;
>
>My first patch avoids the need to introduce a bunch of `hdr.`
>changes. However, `hdr` is introduced as an identifier for
>the members grouped in the new type `struct mlx5e_umr_wqe_hdr`.
>
>Of course struct_group_tagged() also creates an anonymous struct,
>which is why we can avoid all those `hdr.` changes in v1.
>
I missed the fact that it was used part of another struct that needed only
the header.
This patch is alright, no need to change anything.
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
>--
>Gustavo
next prev parent reply other threads:[~2025-02-27 22:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 3:17 [PATCH v3][next] net/mlx5e: Avoid a hundred -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2025-02-26 18:49 ` Saeed Mahameed
2025-02-27 1:25 ` Jakub Kicinski
2025-02-27 22:27 ` Saeed Mahameed
2025-02-27 1:36 ` Gustavo A. R. Silva
2025-02-27 22:29 ` Saeed Mahameed [this message]
2025-02-28 1:29 ` patchwork-bot+netdevbpf
2025-02-28 1:37 ` Gustavo A. R. Silva
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=Z8DnLGnhV3WxpHyW@x130 \
--to=saeed@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavo@embeddedor.com \
--cc=gustavoars@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.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).