From: Maurizio Lombardi Date: Wed, 23 Aug 2017 23:55:48 +0000 (-0700) Subject: scsi: lpfc: fix "integer constant too large" error on 32bit archs X-Git-Tag: v4.1.12-124.31.3~1005 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b637cd3eebacc52b389ab5908a5457641c20100f;p=users%2Fjedix%2Flinux-maple.git scsi: lpfc: fix "integer constant too large" error on 32bit archs 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 Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen (cherry picked from commit 286871a6667c3d4d27a4cf1ee519e629527dfc9d) Signed-off-by: Dick dkennedy Conflicts: drivers/scsi/lpfc/lpfc_init.c base nvme changes included msi.h and caused patch to not align. Signed-off-by: Dan Duval Reviewed-by: Jack Vogel --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index a8bdb8c87278..4b8c1bf05e59 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -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); } /**