From: Bart Van Assche Date: Wed, 13 Sep 2017 15:13:37 +0000 (+0530) Subject: qla2xxx: Simplify usage of SRB structure in driver X-Git-Tag: v4.1.12-117.0_27200813_3~70 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=99f6f5d61e388ddd2cb6fe82c811bb9c1c622db3;p=users%2Fjedix%2Flinux-maple.git qla2xxx: Simplify usage of SRB structure in driver Orabug: 26844197, 26923029 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 Signed-off-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Nicholas Bellinger Signed-off-by: Brian Maly Reviewed-by: Jack Vogel --- diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c9dd44bb8e52..1c37a13f7a34 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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) {