diff options
author | David Arinzon <darinzon@amazon.com> | 2024-01-01 19:08:54 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-01-03 18:00:58 -0800 |
commit | 4f28e789be761a57176904c01959cc9d439bd17a (patch) | |
tree | 89c1936fdd2d9c3b737395920b3a00f66f79e1b0 /drivers/net/ethernet/amazon | |
parent | ea5c460023aad8d97e206e57ca4ce9d1b733c430 (diff) | |
download | lwn-4f28e789be761a57176904c01959cc9d439bd17a.tar.gz lwn-4f28e789be761a57176904c01959cc9d439bd17a.zip |
net: ena: Make queue stats code cleaner by removing the if block
Also shorten comment related to it.
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Link: https://lore.kernel.org/r/20240101190855.18739-11-darinzon@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/amazon')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_ethtool.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c index 724af7dfefae..0cb6cc1cef56 100644 --- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c +++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c @@ -263,17 +263,14 @@ static void ena_queue_strings(struct ena_adapter *adapter, u8 **data) ena_stats->name); } - if (!is_xdp) { - /* RX stats, in XDP there isn't a RX queue - * counterpart - */ - for (j = 0; j < ENA_STATS_ARRAY_RX; j++) { - ena_stats = &ena_stats_rx_strings[j]; + /* In XDP there isn't an RX queue counterpart */ + if (is_xdp) + continue; - ethtool_sprintf(data, - "queue_%u_rx_%s", i, - ena_stats->name); - } + for (j = 0; j < ENA_STATS_ARRAY_RX; j++) { + ena_stats = &ena_stats_rx_strings[j]; + + ethtool_sprintf(data, "queue_%u_rx_%s", i, ena_stats->name); } } } |