nfp: fix print format for ring pointers in ring dumps
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 29 May 2017 00:53:02 +0000 (17:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 May 2017 15:27:06 +0000 (11:27 -0400)
Ring pointers are unsigned.  Fix the print formats to avoid
showing users negative values.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c

index 6cf1b234eecd3fdc92688a12aac92ed76829fe46..8c52c0e8379c37faf7a90e905b186105cb1ad95a 100644 (file)
@@ -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,