Re: [PATCH v3][next] net/mlx5e: Avoid a hundred -Wflex-array-member-not-at-end warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

--
Gustavo




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux