diff options
author | Naresh Gottumukkala <bgottumukkala@emulex.com> | 2013-08-07 11:22:33 +0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-08-12 21:58:38 +0400 |
commit | 1afc0454b6658ad2d0a87e594e1f06dc19c6977d (patch) | |
tree | 5d57e75ef9a5ba3b42bdc3d68914a5de92793208 /drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |
parent | f99b1649dbb6342d618307faef1f214fd54928b9 (diff) | |
download | linux-1afc0454b6658ad2d0a87e594e1f06dc19c6977d.tar.xz |
RDMA/ocrdma: Remove redundant dev reference
Remove redundant dev reference from structures:
1) ocrdma_cq.
2) ocrdma_ah.
3) ocrdma_hw_mr.
4) ocrdma_mw.
5) ocrdma_srq.
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index a6bb3d074d2d..df9e73758afb 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c @@ -35,12 +35,11 @@ #include "ocrdma_ah.h" #include "ocrdma_hw.h" -static inline int set_av_attr(struct ocrdma_ah *ah, +static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, struct ib_ah_attr *attr, int pdid) { int status = 0; u16 vlan_tag; bool vlan_enabled = false; - struct ocrdma_dev *dev = ah->dev; struct ocrdma_eth_vlan eth; struct ocrdma_grh grh; int eth_sz; @@ -100,12 +99,11 @@ 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 = dev; status = ocrdma_alloc_av(dev, ah); if (status) goto av_err; - status = set_av_attr(ah, attr, pd->id); + status = set_av_attr(dev, ah, attr, pd->id); if (status) goto av_conf_err; @@ -126,7 +124,9 @@ av_err: int ocrdma_destroy_ah(struct ib_ah *ibah) { struct ocrdma_ah *ah = get_ocrdma_ah(ibah); - ocrdma_free_av(ah->dev, ah); + struct ocrdma_dev *dev = get_ocrdma_dev(ibah->device); + + ocrdma_free_av(dev, ah); kfree(ah); return 0; } |