]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd904c5673b5df746b9cd6915e6fb4fe25f46fb92
tree96c688d656bf309bb0cf922d3269995664b3c7c4
parent1cdaa5e666bb0c47daf211d28e5b3b3c2efb2a49
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