]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drivers/block/nvme-core.c: fix build with gcc-4.4.4
authorAndrew Morton <akpm@linux-foundation.org>
Sat, 27 Jun 2015 18:20:34 +0000 (12:20 -0600)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:31:47 +0000 (16:31 -0700)
commit99bfcebb87968858448655704eed89aaa90b3c53
tree1aff5a7f7fbb39986c3e9e101e1721348d317f28
parenta83aba9a63476996d11053b8436d8cd39b4c2aa1
drivers/block/nvme-core.c: fix build with gcc-4.4.4

gcc-4.4.4 (and possibly other versions) fail the compile when initializers
are used with anonymous unions.  Work around this.

drivers/block/nvme-core.c: In function 'nvme_identify_ctrl':
drivers/block/nvme-core.c:1163: error: unknown field 'identify' specified in initializer
drivers/block/nvme-core.c:1163: warning: missing braces around initializer
drivers/block/nvme-core.c:1163: warning: (near initialization for 'c.<anonymous>')
drivers/block/nvme-core.c:1164: error: unknown field 'identify' specified in initializer
drivers/block/nvme-core.c:1164: warning: excess elements in struct initializer
drivers/block/nvme-core.c:1164: warning: (near initialization for 'c')
...

This patch has no effect on text size with gcc-4.8.2.

Fixes: d29ec8241c10eac ("nvme: submit internal commands through the block layer")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit e44ac588cd61c960226d61c379e2873a95544a51)

Orabug: 22620486
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
drivers/block/nvme-core.c