linux/drivers/infiniband/sw/rdmavt
Bart Van Assche d34ac5cd3a RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const
Since neither ib_post_send() nor ib_post_recv() modify the data structure
their second argument points at, declare that argument const. This change
makes it necessary to declare the 'bad_wr' argument const too and also to
modify all ULPs that call ib_post_send(), ib_post_recv() or
ib_post_srq_recv(). This patch does not change any functionality but makes
it possible for the compiler to verify whether the
ib_post_(send|recv|srq_recv) really do not modify the posted work request.

To make this possible, only one cast had to be introduce that casts away
constness, namely in rpcrdma_post_recvs(). The only way I can think of to
avoid that cast is to introduce an additional loop in that function or to
change the data type of bad_wr from struct ib_recv_wr ** into int
(an index that refers to an element in the work request list). However,
both approaches would require even more extensive changes than this
patch.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-07-30 20:09:34 -06:00
..
ah.c IB{cm, core}: Introduce and use ah_attr copy, move, replace APIs 2018-06-18 11:11:26 -06:00
ah.h IB/core: Rename struct ib_ah_attr to rdma_ah_attr 2017-05-01 14:32:43 -04:00
cq.c IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
cq.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
Kconfig IB: Fix RDMA_RXE and INFINIBAND_RDMAVT dependencies for DMA_VIRT_OPS 2018-05-15 10:48:16 -04:00
mad.c IB/core: Rename ib_destroy_ah to rdma_destroy_ah 2017-05-01 14:32:43 -04:00
mad.h IB/rdmavt: Clean up distinction between port number and index 2016-03-10 20:37:31 -05:00
Makefile This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
mcast.c infiniband: fix sw/rdmavt/* kernel-doc notation 2018-01-10 22:00:35 -07:00
mcast.h IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
mmap.c infiniband: Fix alignment of mmap cookies to support VIPT caching 2017-03-24 16:50:51 -04:00
mmap.h IB/rdmavt: Remove unnecessary exported functions 2016-03-10 20:38:10 -05:00
mr.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
mr.h IB/rdmavt: Add support for ib_map_mr_sg 2016-08-02 16:00:58 -04:00
pd.c IB/hfi1, rdmavt: Update copy_sge to use boolean arguments 2017-02-19 09:18:41 -05:00
pd.h IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
qp.c RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const 2018-07-30 20:09:34 -06:00
qp.h RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const 2018-07-30 20:09:34 -06:00
rc.c IB/hfi1, qib, rdmavt: Move AETH defines to rdma/ib_hdrs.h 2017-02-19 09:18:44 -05:00
srq.c IB/rdmavt: Use correct numa node for SRQ allocation 2018-01-05 13:34:55 -05:00
srq.h IB/rdmavt: Add srq functionality to rdmavt 2016-03-10 20:37:30 -05:00
trace_cq.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
trace_mr.h IB/rdmavt: Compress adjacent SGEs in rvt_lkey_ok() 2017-06-27 16:56:33 -04:00
trace_qp.h IB/rdmavt: Add trace for RNRNAK timer 2018-01-05 13:34:55 -05:00
trace_rc.h IB/rdmavt, IB/hfi1: Fix timer migration regressions 2017-04-05 14:45:09 -04:00
trace_rvt.h IB/rdmavt: Fix trace hierarchy 2016-12-11 15:25:13 -05:00
trace_tx.h IB/rdmavt: Compress adjacent SGEs in rvt_lkey_ok() 2017-06-27 16:56:33 -04:00
trace.c IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
trace.h IB/{rdmavt, hfi1, qib}: Remove get_card_name() downcall 2018-01-05 13:34:55 -05:00
vt.c IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
vt.h IB: remove duplicate header files 2018-03-13 16:46:03 -04:00