public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <james.smart@broadcom.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Dick Kennedy <dick.kennedy@broadcom.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Hannes Reinecke <hare@suse.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: lpfc: use proper format string for dma_addr_t
Date: Tue, 28 Feb 2017 10:05:41 -0800	[thread overview]
Message-ID: <7b969a50-aced-002d-c7be-7adcc4b317cd@broadcom.com> (raw)
In-Reply-To: <20170227203726.3420612-1-arnd@arndb.de>

Arnd,

Thank you. Looks good.

-- james

Signed-off-by: James Smart <james.smart@broadcom.com>


On 2/27/2017 12:37 PM, Arnd Bergmann wrote:
> dma_addr_t may be either u32 or u64, depending on the kernel configuration,
> and we get a warning for the 32-bit case:
>
> drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_ls_req':
> drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
> drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 12 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
> drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_ls_abort':
> drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
> drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 12 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
>
> printk has a special "%pad" format string that passes the dma address by
> reference to solve this problem.
>
> Fixes: 01649561a8b4 ("scsi: lpfc: NVME Initiator: bind to nvme_fc api")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/scsi/lpfc/lpfc_nvme.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
> index 625b6589a34d..609a908ea9db 100644
> --- a/drivers/scsi/lpfc/lpfc_nvme.c
> +++ b/drivers/scsi/lpfc/lpfc_nvme.c
> @@ -457,11 +457,11 @@ lpfc_nvme_ls_req(struct nvme_fc_local_port *pnvme_lport,
>   	/* Expand print to include key fields. */
>   	lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_DISC,
>   			 "6051 ENTER.  lport %p, rport %p lsreq%p rqstlen:%d "
> -			 "rsplen:%d %llux %llux\n",
> +			 "rsplen:%d %pad %pad\n",
>   			 pnvme_lport, pnvme_rport,
>   			 pnvme_lsreq, pnvme_lsreq->rqstlen,
> -			 pnvme_lsreq->rsplen, pnvme_lsreq->rqstdma,
> -			 pnvme_lsreq->rspdma);
> +			 pnvme_lsreq->rsplen, &pnvme_lsreq->rqstdma,
> +			 &pnvme_lsreq->rspdma);
>   
>   	vport->phba->fc4NvmeLsRequests++;
>   
> @@ -527,11 +527,11 @@ lpfc_nvme_ls_abort(struct nvme_fc_local_port *pnvme_lport,
>   	/* Expand print to include key fields. */
>   	lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_ABTS,
>   			 "6040 ENTER.  lport %p, rport %p lsreq %p rqstlen:%d "
> -			 "rsplen:%d %llux %llux\n",
> +			 "rsplen:%d %pad %pad\n",
>   			 pnvme_lport, pnvme_rport,
>   			 pnvme_lsreq, pnvme_lsreq->rqstlen,
> -			 pnvme_lsreq->rsplen, pnvme_lsreq->rqstdma,
> -			 pnvme_lsreq->rspdma);
> +			 pnvme_lsreq->rsplen, &pnvme_lsreq->rqstdma,
> +			 &pnvme_lsreq->rspdma);
>   
>   	/*
>   	 * Lock the ELS ring txcmplq and build a local list of all ELS IOs

      parent reply	other threads:[~2017-02-28 18:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 20:37 [PATCH] scsi: lpfc: use proper format string for dma_addr_t Arnd Bergmann
2017-02-28  3:11 ` Martin K. Petersen
2017-02-28 18:05 ` James Smart [this message]

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=7b969a50-aced-002d-c7be-7adcc4b317cd@broadcom.com \
    --to=james.smart@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=dick.kennedy@broadcom.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox