qla2xxx: Fix a warning reported by the "smatch" static checker
authorQuinn Tran <quinn.tran@cavium.com>
Mon, 13 Feb 2017 20:18:29 +0000 (12:18 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 19 Feb 2017 05:24:22 +0000 (21:24 -0800)
Fix the following warning reported by the "smatch" static checker:

drivers/scsi/qla2xxx/qla_init.c:3910 qla2x00_alloc_fcport()
warn: use 'flags' here instead of GFP_XXX?

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/qla_init.c

index f65431480833bed6edfaeeff4080c8cd87979754..ac579fc5f202316087da53e1413a5c1ab1e68a42 100644 (file)
@@ -3909,7 +3909,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
 
        fcport->ct_desc.ct_sns = dma_alloc_coherent(&vha->hw->pdev->dev,
                sizeof(struct ct_sns_pkt), &fcport->ct_desc.ct_sns_dma,
-                       GFP_ATOMIC);
+               flags);
        fcport->disc_state = DSC_DELETED;
        fcport->fw_login_state = DSC_LS_PORT_UNAVAIL;
        fcport->deleted = QLA_SESS_DELETED;