Date: Fri, 7 Apr 2017 10:17:37 -0700 From: Xin LI <delphij@gmail.com> To: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com> Cc: "David E. O'Brien" <obrien@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r316591 - head/sys/dev/tpm Message-ID: <CAGMYy3uDMcTQw_MqquXGxfPWcWFF9FikTA4LWwK4jmsvgjza1Q@mail.gmail.com> In-Reply-To: <F4902DBF-9E62-4ED0-8960-851E43F4F745@gmail.com> References: <201704062221.v36MLnr7092648@repo.freebsd.org> <F4902DBF-9E62-4ED0-8960-851E43F4F745@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
No, David's change was correct. The code context is something like: #ifdef __FreeBSD__ [...] #else /* OpenBSD */ ... #ifdef __FreeBSD__ /* -- this portion got removed -- */ ... #else ... #endif [...] #endif On Thu, Apr 6, 2017 at 10:19 PM, Ngie Cooper (yaneurabeya) <yaneurabeya@gmail.com> wrote: > >> On Apr 6, 2017, at 15:21, David E. O'Brien <obrien@FreeBSD.org> wrote: >> >> Author: obrien >> Date: Thu Apr 6 22:21:49 2017 >> New Revision: 316591 >> URL: https://svnweb.freebsd.org/changeset/base/316591 >> >> Log: >> Remove dead code. >> The #ifdef __FreeBSD__ section within the OpenBSD tpm_attach() implementation >> can never be active. >> >> Modified: >> head/sys/dev/tpm/tpm.c >> >> Modified: head/sys/dev/tpm/tpm.c >> ============================================================================== >> --- head/sys/dev/tpm/tpm.c Thu Apr 6 20:12:39 2017 (r316590) >> +++ head/sys/dev/tpm/tpm.c Thu Apr 6 22:21:49 2017 (r316591) >> @@ -422,12 +422,8 @@ tpm_attach(device_t parent, device_t sel >> return; >> } >> >> -#ifdef __FreeBSD__ >> - sc->sc_suspend = 0; >> -#else >> sc->sc_suspend = PWR_RESUME; >> sc->sc_powerhook = powerhook_establish(tpm_powerhook, sc); >> -#endif >> } >> #endif > > Hi David, > I think you meant to delete the other piece of code (__FreeBSD__ is always defined). > Also, why delete lines that might make it harder to backport changes from OpenBSD? > Thanks, > -Ngie
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGMYy3uDMcTQw_MqquXGxfPWcWFF9FikTA4LWwK4jmsvgjza1Q>