[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cefca512-2368-46ea-84f7-1e59fd1436d7@nvidia.com>
Date: Mon, 31 Mar 2025 03:28:10 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>, Christoph Hellwig
<hch@....de>, Sagi Grimberg <sagi@...mberg.me>, Chaitanya Kulkarni
<chaitanyak@...dia.com>
CC: "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hardening@...r.kernel.org" <linux-hardening@...r.kernel.org>
Subject: Re: [PATCH][next] nvme-loop: Avoid -Wflex-array-member-not-at-end
warning
On 3/28/25 07:25, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
>
> Move the conflicting declaration to the end of the structure. Notice
> that `struct nvme_loop_iod` is a flexible structure --a structure
> that contains a flexible-array member.
Indeed :-
18 struct nvme_loop_iod {
19 struct nvme_request nvme_req;
20 struct nvme_command cmd;
21 struct nvme_completion cqe;
22 struct nvmet_req req;
23 struct nvme_loop_queue *queue;
24 struct work_struct work;
25 struct sg_table sg_table;
26 struct scatterlist first_sgl[];
27 };
> Fix the following warning:
>
> drivers/nvme/target/loop.c:36:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
>
> Signed-off-by: Gustavo A. R. Silva<gustavoars@...nel.org>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>
-ck
Powered by blists - more mailing lists