[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAsGZS7sPYqXi+KxjD9omzvDME6A3SFGv+kMadMhJk6qNtSsBw@mail.gmail.com>
Date: Mon, 14 Nov 2011 10:54:01 -0500
From: chetan loke <loke.chetan@...il.com>
To: Jesper Juhl <jj@...osbits.net>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Changli Gao <xiaosuo@...il.com>,
Ben Greear <greearb@...delatech.com>,
waltje@...lt.nl.mugnet.org, gw4pts@...pts.ampr.org,
waltje@...ux.com, ross.biro@...il.com, alan@...ux.intel.com
Subject: Re: [PATCH] net/packet: remove dead code and unneeded variable from prb_setup_retire_blk_timer()
On Sun, Nov 13, 2011 at 4:55 PM, Jesper Juhl <jj@...osbits.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists