[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200618200235.1104587-1-niklas.cassel@wdc.com>
Date: Thu, 18 Jun 2020 22:02:32 +0200
From: Niklas Cassel <niklas.cassel@....com>
To: Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <chaitanya.kulkarni@....com>
Cc: Niklas Cassel <niklas.cassel@....com>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/2] remove workarounds for gcc bug wrt unnamed fields in initializers
Make the nvme code more uniform by initializing struct members at
declaration time. This change is done both in drivers/nvme/host/ and
drivers/nvme/target/.
This is how the design pattern was in nvme, before workarounds for a gcc
bug were introduced in commit e44ac588cd61 ("drivers/block/nvme-core.c:
fix build with gcc-4.4.4").
Since the minimum gcc version needed to build the kernel is now gcc 4.8.0,
which does not have this bug, revert to the previous design pattern,
which matches how the rest of the nvme code handles initialization
of struct members (excluding the cases where anonymous unions were
involved).
If, for some reason, we want to allow builds with gcc < 4.6.0
even though the minimum gcc version is now 4.8.0,
there is another less intrusive workaround where you add an extra pair of
curly braces, see e.g. commit 6cc65be4f6f2 ("locking/qspinlock: Fix build
for anonymous union in older GCC compilers").
Changes since v1:
-Fixed RDMA build error.
Niklas Cassel (2):
nvme: remove workarounds for gcc bug wrt unnamed fields in
initializers
nvmet: remove workarounds for gcc bug wrt unnamed fields in
initializers
drivers/nvme/host/core.c | 59 ++++++++++++++++++------------------
drivers/nvme/host/lightnvm.c | 32 +++++++++----------
drivers/nvme/host/rdma.c | 28 ++++++++---------
drivers/nvme/target/rdma.c | 23 +++++++-------
4 files changed, 71 insertions(+), 71 deletions(-)
--
2.26.2
Powered by blists - more mailing lists