svn commit: r259896 - head/sys/dev/cxgb/common

John-Mark Gurney jmg at funkthat.com
Sun Dec 29 21:28:27 UTC 2013


Pedro Giffuni wrote this message on Sun, Dec 29, 2013 at 15:51 -0500:
> On 26.12.2013 06:13, Dimitry Andric wrote:
> >On 26 Dec 2013, at 02:51, Adrian Chadd <adrian at freebsd.org> wrote:
> >>I'd prefer you didn't remove unused code in drivers like this. If you
> >>must, #if 0 them out.
> >I don't mind either way, but some other people are very much opposed to
> >littering code with #if 0'd sections.  So, how do to determine what is
> >right in each situation? :-)
> >
> 
> FWIW, I am also in favor of removing instead of #if 0.
> If we really need the code back, we have subversion for that.
> 
> I guess an exception would be on contributed code, where one
> still wants to keep things similar.
> 
> Just my 0.02$, no strong feelings about either way.

My vote for code like this to #if 0 it out..  The reason being is
that this is generic hardware register access, and it's likely that
if it is removed and someone needs it, they'll write their own
instead of dig it out of history, since they might not even realize
that it even existed...

Though can't we annotate it as unused?  Since it is static inline, the
compiler should end up not including it in the object.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the svn-src-head mailing list