提交 fbcfac34 编写于 作者: H Heinrich Schuchardt 提交者: Jeff Kirsher

i40e: use matching format identifiers

i is defined as int but output as %u several times.
Adjust the format identifiers.
Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 7d94906b
...@@ -1560,13 +1560,13 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset, ...@@ -1560,13 +1560,13 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
} }
#endif #endif
for (i = 0; i < vsi->num_queue_pairs; i++) { for (i = 0; i < vsi->num_queue_pairs; i++) {
snprintf(p, ETH_GSTRING_LEN, "tx-%u.tx_packets", i); snprintf(p, ETH_GSTRING_LEN, "tx-%d.tx_packets", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, "tx-%u.tx_bytes", i); snprintf(p, ETH_GSTRING_LEN, "tx-%d.tx_bytes", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, "rx-%u.rx_packets", i); snprintf(p, ETH_GSTRING_LEN, "rx-%d.rx_packets", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, "rx-%u.rx_bytes", i); snprintf(p, ETH_GSTRING_LEN, "rx-%d.rx_bytes", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
} }
if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1)
...@@ -1581,16 +1581,16 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset, ...@@ -1581,16 +1581,16 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
} }
for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"veb.tc_%u_tx_packets", i); "veb.tc_%d_tx_packets", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"veb.tc_%u_tx_bytes", i); "veb.tc_%d_tx_bytes", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"veb.tc_%u_rx_packets", i); "veb.tc_%d_rx_packets", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"veb.tc_%u_rx_bytes", i); "veb.tc_%d_rx_bytes", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
} }
} }
...@@ -1601,23 +1601,23 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset, ...@@ -1601,23 +1601,23 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
} }
for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) { for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"port.tx_priority_%u_xon", i); "port.tx_priority_%d_xon", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"port.tx_priority_%u_xoff", i); "port.tx_priority_%d_xoff", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
} }
for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) { for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"port.rx_priority_%u_xon", i); "port.rx_priority_%d_xon", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"port.rx_priority_%u_xoff", i); "port.rx_priority_%d_xoff", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
} }
for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) { for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
snprintf(p, ETH_GSTRING_LEN, snprintf(p, ETH_GSTRING_LEN,
"port.rx_priority_%u_xon_2_xoff", i); "port.rx_priority_%d_xon_2_xoff", i);
p += ETH_GSTRING_LEN; p += ETH_GSTRING_LEN;
} }
/* BUG_ON(p - data != I40E_STATS_LEN * ETH_GSTRING_LEN); */ /* BUG_ON(p - data != I40E_STATS_LEN * ETH_GSTRING_LEN); */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册