]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: lpfc: fix "integer constant too large" error on 32bit archs
authorMaurizio Lombardi <mlombard@redhat.com>
Wed, 23 Aug 2017 23:55:48 +0000 (16:55 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Mar 2018 04:26:26 +0000 (20:26 -0800)
Orabug: 27631736

cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_get_wwpn':
drivers/scsi/lpfc/lpfc_init.c:3253: error: integer constant is too large for 'long' type

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 286871a6667c3d4d27a4cf1ee519e629527dfc9d)
Signed-off-by: Dick dkennedy <dick.kennedy@broadcom.com>
 Conflicts:
drivers/scsi/lpfc/lpfc_init.c
base nvme changes included msi.h and caused patch to
not align.
Signed-off-by: Dan Duval <dan.duval@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/lpfc/lpfc_init.c

index a8bdb8c87278a1397376d102ac3c3fa6b8ae3d2c..4b8c1bf05e59915c2f2be39f53ab6ee884c20fe4 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/firmware.h>
 #include <linux/miscdevice.h>
 #include <linux/percpu.h>
+#include <linux/bitops.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_device.h>
@@ -3381,9 +3382,7 @@ lpfc_get_wwpn(struct lpfc_hba *phba)
        if (phba->sli_rev == LPFC_SLI_REV4)
                return be64_to_cpu(wwn);
        else
-               return (((wwn & 0xffffffff00000000) >> 32) |
-                       ((wwn & 0x00000000ffffffff) << 32));
-
+               return rol64(wwn, 32);
 }
 
 /**