]> git.baikalelectronics.ru Git - kernel.git/commit
vmxnet3: Update driver to use ethtool_sprintf
authorAlexander Duyck <alexanderduyck@fb.com>
Wed, 17 Mar 2021 00:31:37 +0000 (17:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Mar 2021 18:42:31 +0000 (11:42 -0700)
commit1cdaa5e666bb0c47daf211d28e5b3b3c2efb2a49
tree8b4183c438ebf41b1f576fbc424596c222f2cbc2
parent286b35db92d85392b89852ee8eb9ba4ad84b75a9
vmxnet3: Update driver to use ethtool_sprintf

So this patch actually does 3 things.

First it removes a stray white space at the start of the variable
declaration in vmxnet3_get_strings.

Second it flips the logic for the string test so that we exit immediately
if we are not looking for the stats strings. Doing this we can avoid
unnecessary indentation and line wrapping.

Then finally it updates the code to use ethtool_sprintf rather than a
memcpy and pointer increment to write the ethtool strings.

Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vmxnet3/vmxnet3_ethtool.c