net: mvpp2: drop useless fields in mvpp2_bm_pool and related code
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 21 Feb 2017 10:28:07 +0000 (11:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Feb 2017 18:16:15 +0000 (13:16 -0500)
commit7ef7e1d949cd517d30a3cc6c7f48bd017d81af6b
treed00f087ba81cd74a4095172c6382ea6b1822d1f1
parent5dfa9e8337b1c8a7e291929e676c167b6ea953e6
net: mvpp2: drop useless fields in mvpp2_bm_pool and related code

This commit drops dead code from the mvpp2 driver. The 'in_use' and
'in_use_thresh' fields of 'struct mvpp2_bm_pool' are
incremented/decremented/initialized in various places. But they are only
used in one place:

       if (is_recycle &&
           (atomic_read(&bm_pool->in_use) < bm_pool->in_use_thresh))
               return 0;

However 'is_recycle', passed as argument to mvpp2_rx_refill() is always
false. So in fact, this code is never reached, and the 'is_recycle'
argument is useless. So let's drop this code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c