All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ntb_tool: Fix printk format
@ 2020-01-14 19:22 Helge Deller
  2020-03-12 23:41 ` Jon Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Helge Deller @ 2020-01-14 19:22 UTC (permalink / raw)
  To: Jon Mason, Dave Jiang, Allen Hubbe, linux-ntb, Serge Semin; +Cc: linux-kernel

The correct printk format is %pa or %pap, but not %pa[p].

Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: 7f46c8b3a5523 ("NTB: ntb_tool: Add full multi-port NTB API support")

diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c
index d592c0ffbd19..69da758fe64c 100644
--- a/drivers/ntb/test/ntb_tool.c
+++ b/drivers/ntb/test/ntb_tool.c
@@ -678,19 +678,19 @@ static ssize_t tool_mw_trans_read(struct file *filep, char __user *ubuf,
 			 &inmw->dma_base);

 	off += scnprintf(buf + off, buf_size - off,
-			 "Window Size    \t%pa[p]\n",
+			 "Window Size    \t%pap\n",
 			 &inmw->size);

 	off += scnprintf(buf + off, buf_size - off,
-			 "Alignment      \t%pa[p]\n",
+			 "Alignment      \t%pap\n",
 			 &addr_align);

 	off += scnprintf(buf + off, buf_size - off,
-			 "Size Alignment \t%pa[p]\n",
+			 "Size Alignment \t%pap\n",
 			 &size_align);

 	off += scnprintf(buf + off, buf_size - off,
-			 "Size Max       \t%pa[p]\n",
+			 "Size Max       \t%pap\n",
 			 &size_max);

 	ret = simple_read_from_buffer(ubuf, size, offp, buf, off);
@@ -907,16 +907,16 @@ static ssize_t tool_peer_mw_trans_read(struct file *filep, char __user *ubuf,
 			 "Virtual address     \t0x%pK\n", outmw->io_base);

 	off += scnprintf(buf + off, buf_size - off,
-			 "Phys Address        \t%pa[p]\n", &map_base);
+			 "Phys Address        \t%pap\n", &map_base);

 	off += scnprintf(buf + off, buf_size - off,
-			 "Mapping Size        \t%pa[p]\n", &map_size);
+			 "Mapping Size        \t%pap\n", &map_size);

 	off += scnprintf(buf + off, buf_size - off,
 			 "Translation Address \t0x%016llx\n", outmw->tr_base);

 	off += scnprintf(buf + off, buf_size - off,
-			 "Window Size         \t%pa[p]\n", &outmw->size);
+			 "Window Size         \t%pap\n", &outmw->size);

 	ret = simple_read_from_buffer(ubuf, size, offp, buf, off);
 	kfree(buf);

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

* Re: [PATCH] ntb_tool: Fix printk format
  2020-01-14 19:22 [PATCH] ntb_tool: Fix printk format Helge Deller
@ 2020-03-12 23:41 ` Jon Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Mason @ 2020-03-12 23:41 UTC (permalink / raw)
  To: Helge Deller
  Cc: Dave Jiang, Allen Hubbe, linux-ntb, Serge Semin, linux-kernel

On Tue, Jan 14, 2020 at 08:22:47PM +0100, Helge Deller wrote:
> The correct printk format is %pa or %pap, but not %pa[p].

Thanks, pulled into my ntb branch

> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> Fixes: 7f46c8b3a5523 ("NTB: ntb_tool: Add full multi-port NTB API support")
> 
> diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c
> index d592c0ffbd19..69da758fe64c 100644
> --- a/drivers/ntb/test/ntb_tool.c
> +++ b/drivers/ntb/test/ntb_tool.c
> @@ -678,19 +678,19 @@ static ssize_t tool_mw_trans_read(struct file *filep, char __user *ubuf,
>  			 &inmw->dma_base);
> 
>  	off += scnprintf(buf + off, buf_size - off,
> -			 "Window Size    \t%pa[p]\n",
> +			 "Window Size    \t%pap\n",
>  			 &inmw->size);
> 
>  	off += scnprintf(buf + off, buf_size - off,
> -			 "Alignment      \t%pa[p]\n",
> +			 "Alignment      \t%pap\n",
>  			 &addr_align);
> 
>  	off += scnprintf(buf + off, buf_size - off,
> -			 "Size Alignment \t%pa[p]\n",
> +			 "Size Alignment \t%pap\n",
>  			 &size_align);
> 
>  	off += scnprintf(buf + off, buf_size - off,
> -			 "Size Max       \t%pa[p]\n",
> +			 "Size Max       \t%pap\n",
>  			 &size_max);
> 
>  	ret = simple_read_from_buffer(ubuf, size, offp, buf, off);
> @@ -907,16 +907,16 @@ static ssize_t tool_peer_mw_trans_read(struct file *filep, char __user *ubuf,
>  			 "Virtual address     \t0x%pK\n", outmw->io_base);
> 
>  	off += scnprintf(buf + off, buf_size - off,
> -			 "Phys Address        \t%pa[p]\n", &map_base);
> +			 "Phys Address        \t%pap\n", &map_base);
> 
>  	off += scnprintf(buf + off, buf_size - off,
> -			 "Mapping Size        \t%pa[p]\n", &map_size);
> +			 "Mapping Size        \t%pap\n", &map_size);
> 
>  	off += scnprintf(buf + off, buf_size - off,
>  			 "Translation Address \t0x%016llx\n", outmw->tr_base);
> 
>  	off += scnprintf(buf + off, buf_size - off,
> -			 "Window Size         \t%pa[p]\n", &outmw->size);
> +			 "Window Size         \t%pap\n", &outmw->size);
> 
>  	ret = simple_read_from_buffer(ubuf, size, offp, buf, off);
>  	kfree(buf);

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

end of thread, other threads:[~2020-03-12 23:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 19:22 [PATCH] ntb_tool: Fix printk format Helge Deller
2020-03-12 23:41 ` Jon Mason

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.