diff options
author | Naresh Gottumukkala <bgottumukkala@emulex.com> | 2013-08-07 12:52:32 +0530 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-08-12 10:58:37 -0700 |
commit | f99b1649dbb6342d618307faef1f214fd54928b9 (patch) | |
tree | 29eeeb358a40d6d5021c90cc845e5e329043b832 /drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |
parent | c095ba7224d8edc71dcef0d655911399a8bd4a3f (diff) | |
download | blackbird-op-linux-f99b1649dbb6342d618307faef1f214fd54928b9.tar.gz blackbird-op-linux-f99b1649dbb6342d618307faef1f214fd54928b9.zip |
RDMA/ocrdma: Style and redundant code cleanup
Code cleanup and remove redundant code:
1) redundant initialization removed
2) braces changed as per CodingStyle.
3) redundant checks removed
4) extra braces in return statements removed.
5) removed unused pd pointer from mr.
6) reorganized get_dma_mr()
7) fixed set_av() to return error on invalid sgid index.
8) reference to ocrdma_dev removed from struct ocrdma_pd.
Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_ah.c')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index f4c587c68f64..a6bb3d074d2d 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c @@ -92,7 +92,7 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) int status; struct ocrdma_ah *ah; struct ocrdma_pd *pd = get_ocrdma_pd(ibpd); - struct ocrdma_dev *dev = pd->dev; + struct ocrdma_dev *dev = get_ocrdma_dev(ibpd->device); if (!(attr->ah_flags & IB_AH_GRH)) return ERR_PTR(-EINVAL); @@ -100,7 +100,7 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) ah = kzalloc(sizeof *ah, GFP_ATOMIC); if (!ah) return ERR_PTR(-ENOMEM); - ah->dev = pd->dev; + ah->dev = dev; status = ocrdma_alloc_av(dev, ah); if (status) |