From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: netdev@vger.kernel.org
Cc: oss-drivers@netronome.com, Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next 10/12] nfp: fix print format for ring pointers in ring dumps
Date: Sat, 27 May 2017 17:34:09 -0700 [thread overview]
Message-ID: <20170528003411.17603-11-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20170528003411.17603-1-jakub.kicinski@netronome.com>
Ring pointers are unsigned. Fix the print formats to avoid
showing users negative values.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c b/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c
index 6cf1b234eecd..8c52c0e8379c 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c
@@ -62,7 +62,7 @@ static int nfp_net_debugfs_rx_q_read(struct seq_file *file, void *data)
fl_rd_p = nfp_qcp_rd_ptr_read(rx_ring->qcp_fl);
fl_wr_p = nfp_qcp_wr_ptr_read(rx_ring->qcp_fl);
- seq_printf(file, "RX[%02d,%02d]: cnt=%d dma=%pad host=%p H_RD=%d H_WR=%d FL_RD=%d FL_WR=%d\n",
+ seq_printf(file, "RX[%02d,%02d]: cnt=%u dma=%pad host=%p H_RD=%u H_WR=%u FL_RD=%u FL_WR=%u\n",
rx_ring->idx, rx_ring->fl_qcidx,
rx_ring->cnt, &rx_ring->dma, rx_ring->rxds,
rx_ring->rd_p, rx_ring->wr_p, fl_rd_p, fl_wr_p);
@@ -146,7 +146,7 @@ static int nfp_net_debugfs_tx_q_read(struct seq_file *file, void *data)
d_rd_p = nfp_qcp_rd_ptr_read(tx_ring->qcp_q);
d_wr_p = nfp_qcp_wr_ptr_read(tx_ring->qcp_q);
- seq_printf(file, "TX[%02d,%02d%s]: cnt=%d dma=%pad host=%p H_RD=%d H_WR=%d D_RD=%d D_WR=%d\n",
+ seq_printf(file, "TX[%02d,%02d%s]: cnt=%u dma=%pad host=%p H_RD=%u H_WR=%u D_RD=%u D_WR=%u\n",
tx_ring->idx, tx_ring->qcidx,
tx_ring == r_vec->tx_ring ? "" : "xdp",
tx_ring->cnt, &tx_ring->dma, tx_ring->txds,
--
2.11.0
next prev parent reply other threads:[~2017-05-28 0:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 0:33 [PATCH net-next 00/12] nfp: pci core, hwmon, live mac addr change Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 01/12] nfp: add set_mac_address support while the interface is up Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 02/12] nfp: set driver VF limit Jakub Kicinski
2017-05-28 14:49 ` Mintz, Yuval
2017-05-28 21:16 ` Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 03/12] nfp: don't set aux pointers if ioremap failed Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 04/12] nfp: only try to get to PCIe ctrl memory if BARs are wide enough Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 05/12] nfp: support long reads and writes with the cpp helpers Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 06/12] nfp: shorten CPP core probe logs Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 07/12] nfp: support variable NSP response lengths Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 08/12] nfp: add hwmon support Jakub Kicinski
2017-05-28 18:50 ` kbuild test robot
2017-05-28 0:34 ` [PATCH net-next 09/12] nfp: don't wait for resources indefinitely Jakub Kicinski
2017-05-28 0:34 ` Jakub Kicinski [this message]
2017-05-31 10:33 ` [PATCH net-next 10/12] nfp: fix print format for ring pointers in ring dumps David Laight
2017-05-28 0:34 ` [PATCH net-next 11/12] nfp: don't add ring size to index calculations Jakub Kicinski
2017-05-28 0:34 ` [PATCH net-next 12/12] nfp: don't keep count for free buffers delayed kick Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170528003411.17603-11-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox