kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] atm: fore200e: use %pK to format kernel addresses instead of %x
@ 2017-11-27 13:24 Colin King
  2017-11-28 21:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-27 13:24 UTC (permalink / raw)
  To: Chas Williams, linux-atm-general, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Don't use %x and casting to print out a kernel address, instead use the
%pK and remove the casting.  Cleans up smatch warning:

drivers/atm/fore200e.c:3093 fore200e_proc_read() warn: argument 3 to %08x
specifier is cast from pointer

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/atm/fore200e.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 126855e6cb7d..6ebc4e4820fc 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -3083,8 +3083,8 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
 	    ASSERT(fore200e_vcc);
 
 	    len = sprintf(page,
-			  "  %08x  %03d %05d %1d   %09lu %05d/%05d      %09lu %05d/%05d\n",
-			  (u32)(unsigned long)vcc,
+			  "  %pK  %03d %05d %1d   %09lu %05d/%05d      %09lu %05d/%05d\n",
+			  vcc,
 			  vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal),
 			  fore200e_vcc->tx_pdu,
 			  fore200e_vcc->tx_min_pdu > 0xFFFF ? 0 : fore200e_vcc->tx_min_pdu,
-- 
2.14.1


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

* Re: [PATCH] atm: fore200e: use %pK to format kernel addresses instead of %x
  2017-11-27 13:24 [PATCH] atm: fore200e: use %pK to format kernel addresses instead of %x Colin King
@ 2017-11-28 21:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-28 21:01 UTC (permalink / raw)
  To: colin.king
  Cc: 3chas3, linux-atm-general, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Mon, 27 Nov 2017 13:24:15 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't use %x and casting to print out a kernel address, instead use the
> %pK and remove the casting.  Cleans up smatch warning:
> 
> drivers/atm/fore200e.c:3093 fore200e_proc_read() warn: argument 3 to %08x
> specifier is cast from pointer
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thank you.

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

end of thread, other threads:[~2017-11-28 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 13:24 [PATCH] atm: fore200e: use %pK to format kernel addresses instead of %x Colin King
2017-11-28 21:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).