aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb3
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-03-20 13:59:50 -0600
committerJason Gunthorpe <jgg@mellanox.com>2018-03-22 12:42:48 -0600
commit761fc376c999df9febaa491bffae2f6722f423ff (patch)
tree18f4a612a1982cbae4e245bddccec0d9e15b69f6 /drivers/infiniband/hw/cxgb3
parentIB/mlx4: Eliminate duplicate barriers on weakly-ordered archs (diff)
downloadlinux-dev-761fc376c999df9febaa491bffae2f6722f423ff.tar.xz
linux-dev-761fc376c999df9febaa491bffae2f6722f423ff.zip
RDMA/cxgb3: Use structs to describe the uABI instead of opencoding
Open coding a loose value is not acceptable for describing the uABI in RDMA. Provide the missing struct. Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_provider.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index 1804b6c4a6ec..be097c6723c0 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -440,7 +440,9 @@ static struct ib_pd *iwch_allocate_pd(struct ib_device *ibdev,
php->pdid = pdid;
php->rhp = rhp;
if (context) {
- if (ib_copy_to_udata(udata, &php->pdid, sizeof (__u32))) {
+ struct iwch_alloc_pd_resp resp = {.pdid = php->pdid};
+
+ if (ib_copy_to_udata(udata, &resp, sizeof(resp))) {
iwch_deallocate_pd(&php->ibpd);
return ERR_PTR(-EFAULT);
}