All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Maurizio Lombardi <mlombard@redhat.com>
Cc: james.smart@broadcom.com, dick.kennedy@broadcom.com,
	jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] lpfc: fix "integer constant too large" error on 32bit archs
Date: Thu, 27 Jul 2017 08:57:19 -0400	[thread overview]
Message-ID: <yq1eft2vxzk.fsf@oracle.com> (raw)
In-Reply-To: <1501158782-29604-1-git-send-email-mlombard@redhat.com> (Maurizio Lombardi's message of "Thu, 27 Jul 2017 14:33:02 +0200")


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()?

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2017-07-27 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-27 12:33 [PATCH] lpfc: fix "integer constant too large" error on 32bit archs Maurizio Lombardi
2017-07-27 12:57 ` Martin K. Petersen [this message]
2017-07-27 14:50   ` Maurizio Lombardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1eft2vxzk.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mlombard@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.