OSDN Git Service

net: ax25: fix misuse of %x
authorFuqian Huang <huangfq.daxian@gmail.com>
Sun, 21 Apr 2019 11:48:06 +0000 (19:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Apr 2019 17:37:26 +0000 (10:37 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ax25/af_ax25.c

index 449e7b7..012c0b6 100644 (file)
@@ -1880,8 +1880,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? "*":"");