Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Dec 2013 13:28:25 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Pedro Giffuni <pfg@FreeBSD.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@FreeBSD.org>, Adrian Chadd <adrian@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, Dimitry Andric <dim@FreeBSD.org>, "svn-src-all@freebsd.org" <svn-src-all@FreeBSD.org>
Subject:   Re: svn commit: r259896 - head/sys/dev/cxgb/common
Message-ID:  <20131229212825.GE99167@funkthat.com>
In-Reply-To: <52C08B47.70106@FreeBSD.org>
References:  <201312252245.rBPMjX5J046556@svn.freebsd.org> <CAJ-Vmo=FufoALvqW-y9iXk%2BfHXDzNcd1riXX5%2Bg_1kG-Kus1=w@mail.gmail.com> <76C5CECF-1A27-4245-B5D1-335C46B253E7@FreeBSD.org> <52C08B47.70106@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131229212825.GE99167>