]> www.infradead.org Git - users/hch/misc.git/commit
nvme-loop: avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 28 Mar 2025 14:25:08 +0000 (08:25 -0600)
committerChristoph Hellwig <hch@lst.de>
Fri, 9 May 2025 05:03:41 +0000 (07:03 +0200)
commitdaa69f4b216e58375239e2596b217eb47181b031
treea04f8b7c6d09b4ba60dc30dcbedd561dfec78e93
parent824afb9b04648ea11531fc9047923ec07e7a943d
nvme-loop: avoid -Wflex-array-member-not-at-end warning

-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.

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@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/loop.c