]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: lpfc: Redefine incorrect type in lpfc_create_device_data()
authorJustin Tee <justin.tee@broadcom.com>
Thu, 12 Dec 2024 23:33:00 +0000 (15:33 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 2 Jan 2025 20:01:21 +0000 (15:01 -0500)
Fix smatch warning by redefining local variable memory_flags from int to
gfp_t.

lpfc_scsi.c: warning: incorrect type in argument 2 (different base types)
lpfc_scsi.c:    expected restricted gfp_t [usertype] gfp_mask
lpfc_scsi.c:    got int memory_flags

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20241212233309.71356-2-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_scsi.c

index 905026a4782cf97c181c9fd5e56ecd5bf9662d10..d7f55a11bcfaf07a55f9f1b9045fadc2660046df 100644 (file)
@@ -6422,7 +6422,7 @@ lpfc_create_device_data(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn,
 {
 
        struct lpfc_device_data *lun_info;
-       int memory_flags;
+       gfp_t memory_flags;
 
        if (unlikely(!phba) || !vport_wwpn || !target_wwpn  ||
            !(phba->cfg_fof))