diff options
author | Maurizio Lombardi <[email protected]> | 2017-08-23 16:55:48 -0700 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2017-08-24 22:29:44 -0400 |
commit | 286871a6667c3d4d27a4cf1ee519e629527dfc9d (patch) | |
tree | 32967dcfa6b466350539ba68bff8351105c571d6 | |
parent | 44fd7fe3dd2ce9dba873a0522e1eeab9ab5d5651 (diff) |
scsi: lpfc: fix "integer constant too large" error on 32bit archs
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 <[email protected]>
Signed-off-by: James Smart <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 1b81f734e3ef..7e7ae786121b 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -37,6 +37,7 @@ #include <linux/miscdevice.h> #include <linux/percpu.h> #include <linux/msi.h> +#include <linux/bitops.h> #include <scsi/scsi.h> #include <scsi/scsi_device.h> @@ -3728,9 +3729,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); } /** |