Patchwork [v2,01/06] atm: iphase: fix misuse of %x

login
register
mail settings
Submitter Fuqian Huang
Date April 21, 2019, 11:46 a.m.
Message ID <20190421114654.20265-1-huangfq.daxian@gmail.com>
Download mbox | patch
Permalink /patch/777745/
State New
Headers show

Comments

Fuqian Huang - April 21, 2019, 11:46 a.m.
Pointers should be printed with %p or %px rather than
cast to long type and printed with %x.
Change %x to %p to print the pointers.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/atm/iphase.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
David Miller - April 21, 2019, 5:37 p.m.
From: Fuqian Huang <huangfq.daxian@gmail.com>
Date: Sun, 21 Apr 2019 19:46:54 +0800

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

Applied to net-next.

Patch

diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 82532c2..5278c57 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -2826,8 +2826,8 @@  static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
          case 0x6:
          {  
              ia_cmds.status = 0; 
-             printk("skb = 0x%lx\n", (long)skb_peek(&iadev->tx_backlog));
-             printk("rtn_q: 0x%lx\n",(long)ia_deque_rtn_q(&iadev->tx_return_q));
+             printk("skb = 0x%p\n", skb_peek(&iadev->tx_backlog));
+             printk("rtn_q: 0x%p\n",ia_deque_rtn_q(&iadev->tx_return_q));
          }
              break;
          case 0x8: