mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 07:13:34 +00:00
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>
This commit is contained in:
parent
97d82a48d7
commit
761fc376c9
2 changed files with 8 additions and 1 deletions
|
@ -440,7 +440,9 @@ static struct ib_pd *iwch_allocate_pd(struct ib_device *ibdev,
|
||||||
php->pdid = pdid;
|
php->pdid = pdid;
|
||||||
php->rhp = rhp;
|
php->rhp = rhp;
|
||||||
if (context) {
|
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);
|
iwch_deallocate_pd(&php->ibpd);
|
||||||
return ERR_PTR(-EFAULT);
|
return ERR_PTR(-EFAULT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,4 +74,9 @@ struct iwch_create_qp_resp {
|
||||||
struct iwch_reg_user_mr_resp {
|
struct iwch_reg_user_mr_resp {
|
||||||
__u32 pbl_addr;
|
__u32 pbl_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct iwch_alloc_pd_resp {
|
||||||
|
__u32 pdid;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* CXGB3_ABI_USER_H */
|
#endif /* CXGB3_ABI_USER_H */
|
||||||
|
|
Loading…
Reference in a new issue