bna: Update driver to use ethtool_sprintf
authorAlexander Duyck <alexanderduyck@fb.com>
Wed, 17 Mar 2021 00:31:46 +0000 (17:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Mar 2021 18:42:31 +0000 (11:42 -0700)
commitb82e8118c540cc0d1e3f542bad2e492b600b4a7e
tree96c688d656bf309bb0cf922d3269995664b3c7c4
parent3b78b3067f386e5943a30112f866cd65b3de2d8b
bna: Update driver to use ethtool_sprintf

Update the bnad_get_strings to make use of ethtool_sprintf and avoid
unnecessary line wrapping. To do this we invert the logic for the string
set test and instead exit immediately if we are not working with the stats
strings. In addition the function is broken up into subfunctions for each
area so that we can simply call ethtool_sprintf once for each string in a
given subsection.

Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/brocade/bna/bnad_ethtool.c