diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/user.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index cfaa56ada189..7151a02b4ebb 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c | |||
@@ -940,7 +940,6 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, | |||
940 | if (!mm2) | 940 | if (!mm2) |
941 | goto err4; | 941 | goto err4; |
942 | 942 | ||
943 | memset(&uresp, 0, sizeof(uresp)); | ||
944 | uresp.qid_mask = rhp->rdev.cqmask; | 943 | uresp.qid_mask = rhp->rdev.cqmask; |
945 | uresp.cqid = chp->cq.cqid; | 944 | uresp.cqid = chp->cq.cqid; |
946 | uresp.size = chp->cq.size; | 945 | uresp.size = chp->cq.size; |
@@ -951,7 +950,8 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, | |||
951 | uresp.gts_key = ucontext->key; | 950 | uresp.gts_key = ucontext->key; |
952 | ucontext->key += PAGE_SIZE; | 951 | ucontext->key += PAGE_SIZE; |
953 | spin_unlock(&ucontext->mmap_lock); | 952 | spin_unlock(&ucontext->mmap_lock); |
954 | ret = ib_copy_to_udata(udata, &uresp, sizeof uresp); | 953 | ret = ib_copy_to_udata(udata, &uresp, |
954 | sizeof(uresp) - sizeof(uresp.reserved)); | ||
955 | if (ret) | 955 | if (ret) |
956 | goto err5; | 956 | goto err5; |
957 | 957 | ||
diff --git a/drivers/infiniband/hw/cxgb4/user.h b/drivers/infiniband/hw/cxgb4/user.h index 11ccd276e5d9..9b7534b5f07d 100644 --- a/drivers/infiniband/hw/cxgb4/user.h +++ b/drivers/infiniband/hw/cxgb4/user.h | |||
@@ -48,6 +48,7 @@ struct c4iw_create_cq_resp { | |||
48 | __u32 cqid; | 48 | __u32 cqid; |
49 | __u32 size; | 49 | __u32 size; |
50 | __u32 qid_mask; | 50 | __u32 qid_mask; |
51 | __u32 reserved; /* explicit padding (optional for i386) */ | ||
51 | }; | 52 | }; |
52 | 53 | ||
53 | 54 | ||