1
0

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>
Este cometimento está contido em:
Jason Gunthorpe
2018-03-20 13:59:50 -06:00
ascendente 97d82a48d7
cometimento 761fc376c9
2 ficheiros modificados com 8 adições e 1 eliminações

Ver ficheiro

@@ -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);
}