Messages in this thread |  | | Date | Mon, 14 Nov 2011 10:54:01 -0500 | | Subject | Re: [PATCH] net/packet: remove dead code and unneeded variable from prb_setup_retire_blk_timer() | | From | chetan loke <> |
| |
On Sun, Nov 13, 2011 at 4:55 PM, Jesper Juhl <jj@chaosbits.net> wrote: > We test for 'tx_ring' being != zero and BUG() if that's the case. So after > that check there is no way that 'tx_ring' could be anything _but_ zero, so > testing it again is just dead code. Once that dead code is removed, the > 'pkc' local variable becomes entirely redundant, so remove that as well.
It was there so that it would be a no-brainer thing for the next person who would want to enable tx_ring support. And given that this check was called just once during the initial setup, it didn't seem like a big deal to me. And the BUG() would let the next-person know what different paths need to be plugged.
Chetan Loke
|  |