Message ID | 1501158782-29604-1-git-send-email-mlombard@redhat.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Maurizio, > 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> > --- > drivers/scsi/lpfc/lpfc_init.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c > index 491aa95..e992dc1 100644 > --- a/drivers/scsi/lpfc/lpfc_init.c > +++ b/drivers/scsi/lpfc/lpfc_init.c > @@ -3710,8 +3710,8 @@ > if (phba->sli_rev == LPFC_SLI_REV4) > return be64_to_cpu(wwn); > else > - return (((wwn & 0xffffffff00000000) >> 32) | > - ((wwn & 0x00000000ffffffff) << 32)); > + return (((wwn & 0xffffffff00000000ULL) >> 32) | > + ((wwn & 0x00000000ffffffffULL) << 32)); rol64()?
Dne 27.7.2017 v 14:57 Martin K. Petersen napsal(a): >> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c >> index 491aa95..e992dc1 100644 >> --- a/drivers/scsi/lpfc/lpfc_init.c >> +++ b/drivers/scsi/lpfc/lpfc_init.c >> @@ -3710,8 +3710,8 @@ >> if (phba->sli_rev == LPFC_SLI_REV4) >> return be64_to_cpu(wwn); >> else >> - return (((wwn & 0xffffffff00000000) >> 32) | >> - ((wwn & 0x00000000ffffffff) << 32)); >> + return (((wwn & 0xffffffff00000000ULL) >> 32) | >> + ((wwn & 0x00000000ffffffffULL) << 32)); > > rol64()? > Right, I will send a new version. Maurizio
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 491aa95..e992dc1 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -3710,8 +3710,8 @@ if (phba->sli_rev == LPFC_SLI_REV4) return be64_to_cpu(wwn); else - return (((wwn & 0xffffffff00000000) >> 32) | - ((wwn & 0x00000000ffffffff) << 32)); + return (((wwn & 0xffffffff00000000ULL) >> 32) | + ((wwn & 0x00000000ffffffffULL) << 32)); }
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> --- drivers/scsi/lpfc/lpfc_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)