linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 04/06] net: ax25: fix misuse of %x
@ 2019-04-21 11:48 Fuqian Huang
  2019-04-21 17:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Fuqian Huang @ 2019-04-21 11:48 UTC (permalink / raw)
  Cc: Fuqian Huang, Joerg Reuter, Ralf Baechle, David S. Miller,
	linux-hams, netdev, linux-kernel

Pointers should be printed with %p or %px rather than
cast to long type and printed with %8.8lx.
Change %8.8lx to %p to print the pointer.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 net/ax25/af_ax25.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 5d01edf..90c2831 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1888,8 +1888,8 @@ static int ax25_info_show(struct seq_file *seq, void *v)
 	 * magic dev src_addr dest_addr,digi1,digi2,.. st vs vr va t1 t1 t2 t2 t3 t3 idle idle n2 n2 rtt window paclen Snd-Q Rcv-Q inode
 	 */
 
-	seq_printf(seq, "%8.8lx %s %s%s ",
-		   (long) ax25,
+	seq_printf(seq, "%p %s %s%s ",
+		   ax25,
 		   ax25->ax25_dev == NULL? "???" : ax25->ax25_dev->dev->name,
 		   ax2asc(buf, &ax25->source_addr),
 		   ax25->iamdigi? "*":"");
-- 
2.11.0


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

* Re: [PATCH v2 04/06] net: ax25: fix misuse of %x
  2019-04-21 11:48 [PATCH v2 04/06] net: ax25: fix misuse of %x Fuqian Huang
@ 2019-04-21 17:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-21 17:37 UTC (permalink / raw)
  To: huangfq.daxian; +Cc: jreuter, ralf, linux-hams, netdev, linux-kernel

From: Fuqian Huang <huangfq.daxian@gmail.com>
Date: Sun, 21 Apr 2019 19:48:06 +0800

> Pointers should be printed with %p or %px rather than
> cast to long type and printed with %8.8lx.
> Change %8.8lx to %p to print the pointer.
> 
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>

Applied to net-next.

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

end of thread, other threads:[~2019-04-21 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21 11:48 [PATCH v2 04/06] net: ax25: fix misuse of %x Fuqian Huang
2019-04-21 17:37 ` 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).