]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerBrian Maly <brian.maly@oracle.com>
Thu, 2 Nov 2017 18:14:20 +0000 (14:14 -0400)
Orabug: 2684419726923029

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>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/qla2xxx/qla_init.c

index c4e5d0ebdd5d4bd2778476255da8c9611f187ad2..d6b4119b73c2e4928eef1b5b36d5666de4a964e2 100644 (file)
@@ -3897,7 +3897,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;