public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: qedf: Use vsprintf extension %pad
@ 2017-03-06 18:32 Joe Perches
  2017-03-06 19:34 ` Chad Dupuis
  2017-03-07  3:39 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Joe Perches @ 2017-03-06 18:32 UTC (permalink / raw)
  To: QLogic-Storage-Upstream
  Cc: kbuild test robot, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, linux-kernel

Using %llx for a dma_addr_t can lead to format/argument mismatches.
Use %pad and the address of the dma_addr_t instead.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/scsi/qedf/qedf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index d9d7a86b5f8b..8e2a160490e6 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -2456,8 +2456,8 @@ static int qedf_alloc_bdq(struct qedf_ctx *qedf)
 	}
 
 	QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC,
-	    "BDQ PBL addr=0x%p dma=0x%llx.\n", qedf->bdq_pbl,
-	    qedf->bdq_pbl_dma);
+		  "BDQ PBL addr=0x%p dma=%pad\n",
+		  qedf->bdq_pbl, &qedf->bdq_pbl_dma);
 
 	/*
 	 * Populate BDQ PBL with physical and virtual address of individual
-- 
2.10.0.rc2.1.g053435c

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: qedf: Use vsprintf extension %pad
  2017-03-06 18:32 [PATCH] scsi: qedf: Use vsprintf extension %pad Joe Perches
@ 2017-03-06 19:34 ` Chad Dupuis
  2017-03-07  3:39 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Chad Dupuis @ 2017-03-06 19:34 UTC (permalink / raw)
  To: Joe Perches
  Cc: QLogic-Storage-Upstream, kbuild test robot, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, linux-kernel


On Mon, 6 Mar 2017, 6:32pm -0000, Joe Perches wrote:

> Using %llx for a dma_addr_t can lead to format/argument mismatches.
> Use %pad and the address of the dma_addr_t instead.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/scsi/qedf/qedf_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
> index d9d7a86b5f8b..8e2a160490e6 100644
> --- a/drivers/scsi/qedf/qedf_main.c
> +++ b/drivers/scsi/qedf/qedf_main.c
> @@ -2456,8 +2456,8 @@ static int qedf_alloc_bdq(struct qedf_ctx *qedf)
>  	}
>  
>  	QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC,
> -	    "BDQ PBL addr=0x%p dma=0x%llx.\n", qedf->bdq_pbl,
> -	    qedf->bdq_pbl_dma);
> +		  "BDQ PBL addr=0x%p dma=%pad\n",
> +		  qedf->bdq_pbl, &qedf->bdq_pbl_dma);
>  
>  	/*
>  	 * Populate BDQ PBL with physical and virtual address of individual
> 

Looks good.

Acked-by: Chad Dupuis <chad.dupuis@cavium.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: qedf: Use vsprintf extension %pad
  2017-03-06 18:32 [PATCH] scsi: qedf: Use vsprintf extension %pad Joe Perches
  2017-03-06 19:34 ` Chad Dupuis
@ 2017-03-07  3:39 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-03-07  3:39 UTC (permalink / raw)
  To: Joe Perches
  Cc: QLogic-Storage-Upstream, kbuild test robot, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, linux-kernel

>>>>> "Joe" == Joe Perches <joe@perches.com> writes:

Joe> Using %llx for a dma_addr_t can lead to format/argument mismatches.
Joe> Use %pad and the address of the dma_addr_t instead.

Applied to 4.11/scsi-fixes.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-07  3:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-06 18:32 [PATCH] scsi: qedf: Use vsprintf extension %pad Joe Perches
2017-03-06 19:34 ` Chad Dupuis
2017-03-07  3:39 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox