diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-11-04 10:50:32 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2015-12-11 14:10:51 -0800 |
commit | 7edc5a999d6bec1b5ef4d363b78578c0a723ef69 (patch) | |
tree | 8468e2461c3057c2f53f1c99d16017699d7003a8 /drivers/infiniband/ulp/iser/iser_verbs.c | |
parent | 0f512b34c637db18cd0cf27a467acd173401209d (diff) |
IB/iser: Use helper for container_of
Nicer this way.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_verbs.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_verbs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 7eccfa7e82f6..67c4e341291d 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -461,8 +461,7 @@ void iser_free_fastreg_pool(struct ib_conn *ib_conn) */ static int iser_create_ib_conn_res(struct ib_conn *ib_conn) { - struct iser_conn *iser_conn = container_of(ib_conn, struct iser_conn, - ib_conn); + struct iser_conn *iser_conn = to_iser_conn(ib_conn); struct iser_device *device; struct ib_device_attr *dev_attr; struct ib_qp_init_attr init_attr; @@ -1166,9 +1165,8 @@ static void iser_handle_comp_error(struct ib_conn *ib_conn, struct ib_wc *wc) { + struct iser_conn *iser_conn = to_iser_conn(ib_conn); void *wr_id = (void *)(uintptr_t)wc->wr_id; - struct iser_conn *iser_conn = container_of(ib_conn, struct iser_conn, - ib_conn); if (wc->status != IB_WC_WR_FLUSH_ERR) if (iser_conn->iscsi_conn) |