]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Simplify usage of SRB structure in driver
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 13 Sep 2017 15:13:37 +0000 (20:43 +0530)
committerBrian Maly <brian.maly@oracle.com>
Thu, 2 Nov 2017 18:14:20 +0000 (14:14 -0400)
Orabug: 2684419726923029

This patch simplifies SRB structure usage in driver.

- Simplify sp->done() and sp->free() interfaces.
- Remove sp->fcport->vha to use vha pointer from sp.
- Use sp->vha context in qla2x00_rel_sp().

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/qla2xxx/qla_os.c

index c9dd44bb8e52651b6e7acf236dc6d3bcca5dfd1e..1c37a13f7a342f00feeaa84d4c31d8516c86d874 100644 (file)
@@ -4094,8 +4094,8 @@ struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *sht,
        init_waitqueue_head(&vha->fcport_waitQ);
        init_waitqueue_head(&vha->vref_waitq);
 
-       vha->gnl.size =
-           sizeof(struct get_name_list_extended[ha->max_loop_id+1]);
+       vha->gnl.size = sizeof(struct get_name_list_extended) *
+                       (ha->max_loop_id + 1);
        vha->gnl.l = dma_alloc_coherent(&ha->pdev->dev,
            vha->gnl.size, &vha->gnl.ldma, GFP_KERNEL);
        if (!vha->gnl.l) {