diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2018-03-13 15:06:45 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-03-14 18:14:08 -0400 |
commit | 06892cc190550807d332c95a0114c7e175584012 (patch) | |
tree | b725cb2962fd448600e78691b3355d1324a7c14d | |
parent | 6ee687735e745eafae9e6b93d1ea70bc52e7ad07 (diff) | |
download | linux-06892cc190550807d332c95a0114c7e175584012.tar.gz linux-06892cc190550807d332c95a0114c7e175584012.tar.bz2 linux-06892cc190550807d332c95a0114c7e175584012.zip |
drivers/infiniband/ulp/srpt/ib_srpt.c: fix build with gcc-4.4.4
gcc-4.4.4 has issues with initialization of anonymous unions:
drivers/infiniband/ulp/srpt/ib_srpt.c: In function 'srpt_zerolength_write':
drivers/infiniband/ulp/srpt/ib_srpt.c:854: error: unknown field 'wr_cqe' specified in initializer
drivers/infiniband/ulp/srpt/ib_srpt.c:854: warning: initialization makes integer from pointer without a cast
Work aound this.
Fixes: 2a78cb4db487 ("IB/srpt: Fix an out-of-bounds stack access in srpt_zerolength_write()")
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 8956d4621273..dfec0e1fac29 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -850,8 +850,9 @@ static int srpt_zerolength_write(struct srpt_rdma_ch *ch) struct ib_send_wr *bad_wr; struct ib_rdma_wr wr = { .wr = { + .next = NULL, + { .wr_cqe = &ch->zw_cqe, }, .opcode = IB_WR_RDMA_WRITE, - .wr_cqe = &ch->zw_cqe, .send_flags = IB_SEND_SIGNALED, } }; |