]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: remove tests for impossible cases in the tx_done path
authorwilly tarreau <w@1wt.eu>
Thu, 16 Jan 2014 07:20:12 +0000 (08:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2014 23:15:42 +0000 (15:15 -0800)
commit5ae67fc5dfd726da3613d79362bd28545d18e03e
treeb4b0bbf5fec97d52a515c8bef433ceff2161cff4
parent4957c01ac114501e9e53e9c91ecf4a12006850d7
net: mvneta: remove tests for impossible cases in the tx_done path

Currently, mvneta_txq_bufs_free() calls mvneta_tx_done_policy() with
a non-null cause to retrieve the pointer to the next queue to process.
There are useless tests on the return queue number and on the pointer,
all of which are well defined within a known limited set. This code
path is fast, although not critical. Removing 3 tests here that the
compiler could not optimize (verified) is always desirable.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c