]> git.baikalelectronics.ru Git - kernel.git/commit
net: tg3: tidy up loop, remove need to compute off with a multiply
authorColin Ian King <colin.king@canonical.com>
Fri, 8 May 2020 23:14:47 +0000 (00:14 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 9 May 2020 05:45:54 +0000 (22:45 -0700)
commitdec9d5372c09cd6bc7f00a299b3b8c83c5abf56c
tree5d4dce1680f21d916ddc4a61fa7c1f5807bf5a5b
parentbdb87ddbe8a161ee008d05b5c81b1dfa43fc9de8
net: tg3: tidy up loop, remove need to compute off with a multiply

Currently the value for 'off' is computed using a multiplication and
a couple of statements later off is being incremented by len and
this value is never read.  Clean up the code by removing the
multiplication and just increment off by len on each iteration.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/tg3.c