linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c
@ 2021-09-22 13:48 Guo Zhi
  2021-09-22 17:51 ` Marciniszyn, Mike
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Guo Zhi @ 2021-09-22 13:48 UTC (permalink / raw)
  To: mike.marciniszyn, dennis.dalessandro, dledford
  Cc: linux-rdma, linux-kernel, Guo Zhi

Pointers should be printed with %p or %px rather than
cast to (unsigned long long) and printed with %llx.
Change %llx to %p to print the pointer.

Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
---
 drivers/infiniband/hw/hfi1/ipoib_tx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c
index e74ddbe4658..15b0cb0f363 100644
--- a/drivers/infiniband/hw/hfi1/ipoib_tx.c
+++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c
@@ -876,14 +876,14 @@ void hfi1_ipoib_tx_timeout(struct net_device *dev, unsigned int q)
 	struct hfi1_ipoib_txq *txq = &priv->txqs[q];
 	u64 completed = atomic64_read(&txq->complete_txreqs);
 
-	dd_dev_info(priv->dd, "timeout txq %llx q %u stopped %u stops %d no_desc %d ring_full %d\n",
-		    (unsigned long long)txq, q,
+	dd_dev_info(priv->dd, "timeout txq %p q %u stopped %u stops %d no_desc %d ring_full %d\n",
+		    txq, q,
 		    __netif_subqueue_stopped(dev, txq->q_idx),
 		    atomic_read(&txq->stops),
 		    atomic_read(&txq->no_desc),
 		    atomic_read(&txq->ring_full));
-	dd_dev_info(priv->dd, "sde %llx engine %u\n",
-		    (unsigned long long)txq->sde,
+	dd_dev_info(priv->dd, "sde %p engine %u\n",
+		    txq->sde,
 		    txq->sde ? txq->sde->this_idx : 0);
 	dd_dev_info(priv->dd, "flow %x\n", txq->flow.as_int);
 	dd_dev_info(priv->dd, "sent %llu completed %llu used %llu\n",
-- 
2.33.0


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c
@ 2021-09-22 12:33 Guo Zhi
  2021-09-22 12:37 ` Dennis Dalessandro
  2021-09-24 14:46 ` Marciniszyn, Mike
  0 siblings, 2 replies; 19+ messages in thread
From: Guo Zhi @ 2021-09-22 12:33 UTC (permalink / raw)
  To: mike.marciniszyn, dennis.dalessandro, dledford
  Cc: linux-rdma, linux-kernel, Guo Zhi

Pointers should be printed with %p or %px rather than
cast to (unsigned long long) and printed with %llx.
Change %llx to %p to print the pointer.

Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
---
 drivers/infiniband/hw/hfi1/ipoib_tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c
index e74ddbe4658..7381f352311 100644
--- a/drivers/infiniband/hw/hfi1/ipoib_tx.c
+++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c
@@ -876,13 +876,13 @@ void hfi1_ipoib_tx_timeout(struct net_device *dev, unsigned int q)
 	struct hfi1_ipoib_txq *txq = &priv->txqs[q];
 	u64 completed = atomic64_read(&txq->complete_txreqs);
 
-	dd_dev_info(priv->dd, "timeout txq %llx q %u stopped %u stops %d no_desc %d ring_full %d\n",
+	dd_dev_info(priv->dd, "timeout txq %p q %u stopped %u stops %d no_desc %d ring_full %d\n",
 		    (unsigned long long)txq, q,
 		    __netif_subqueue_stopped(dev, txq->q_idx),
 		    atomic_read(&txq->stops),
 		    atomic_read(&txq->no_desc),
 		    atomic_read(&txq->ring_full));
-	dd_dev_info(priv->dd, "sde %llx engine %u\n",
+	dd_dev_info(priv->dd, "sde %p engine %u\n",
 		    (unsigned long long)txq->sde,
 		    txq->sde ? txq->sde->this_idx : 0);
 	dd_dev_info(priv->dd, "flow %x\n", txq->flow.as_int);
-- 
2.33.0


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

end of thread, other threads:[~2021-09-27 17:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 13:48 [PATCH] infiniband hfi1: fix misuse of %x in ipoib_tx.c Guo Zhi
2021-09-22 17:51 ` Marciniszyn, Mike
2021-09-22 18:05   ` Bart Van Assche
2021-09-23  6:45     ` Leon Romanovsky
2021-09-23 11:04       ` Marciniszyn, Mike
2021-09-23 11:44         ` Leon Romanovsky
2021-09-23 12:18           ` Marciniszyn, Mike
2021-09-24  2:46       ` Bart Van Assche
2021-09-24 14:43         ` Marciniszyn, Mike
2021-09-25  0:20           ` Guo Zhi
2021-09-23 11:03     ` Marciniszyn, Mike
2021-09-23 13:15       ` Jason Gunthorpe
2021-09-23  2:03   ` 郭志
2021-09-23 12:51   ` 郭志
2021-09-27 13:05 ` Marciniszyn, Mike
2021-09-27 17:42 ` Jason Gunthorpe
  -- strict thread matches above, loose matches on Subject: below --
2021-09-22 12:33 Guo Zhi
2021-09-22 12:37 ` Dennis Dalessandro
2021-09-24 14:46 ` Marciniszyn, Mike

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).