nvme-rdma: move assignment to declaration
authorSagi Grimberg <sagi@grimberg.me>
Wed, 11 Oct 2017 12:29:08 +0000 (15:29 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 18 Oct 2017 17:27:52 +0000 (19:27 +0200)
No need for the extra line for trivial assignments.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/rdma.c

index 02b3388af308ca418e5db39a515edad3086f4b59..221ace23aaa5e2386375f8ec8d18d71d975af34a 100644 (file)
@@ -434,11 +434,9 @@ out_err:
 
 static void nvme_rdma_destroy_queue_ib(struct nvme_rdma_queue *queue)
 {
-       struct nvme_rdma_device *dev;
-       struct ib_device *ibdev;
+       struct nvme_rdma_device *dev = queue->device;
+       struct ib_device *ibdev = dev->dev;
 
-       dev = queue->device;
-       ibdev = dev->dev;
        rdma_destroy_qp(queue->cm_id);
        ib_free_cq(queue->ib_cq);