]> 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)
commitefa14d953e02677efcd066e0c49940b175d7d9c3
tree96c688d656bf309bb0cf922d3269995664b3c7c4
parentc96d1c1297f06498ccb48c1a562e6834404bc8e5
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