From owner-svn-src-head@freebsd.org Fri Apr 7 17:17:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E12D339AD; Fri, 7 Apr 2017 17:17:38 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 991AC351; Fri, 7 Apr 2017 17:17:38 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-oi0-x234.google.com with SMTP id g204so19871011oib.1; Fri, 07 Apr 2017 10:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CzbYk+q/gliRu1url5BCffOv4WCYgNgXM8PiUjiiGQc=; b=SYmmv54CeJnySZ+a7puDmuStsGVf41gsqFIvJrObUWzylU81+huNJ+x08RcbUcABeE Lm27uqREWEeGgbShmJjG51/NH6IgoDF5dtf2FPkvSfGSGHX1hZnPvlJ+g9yic3RvtVfv VXa62+oaC8hzndqgnKg/D8YrfVXo9nArteUytXSnRuD0nU8J+tsiYqx4bSQhdbXOo3uX +MfCIMlXe+CQGApLVwhdbLbRPxg7uPg1ZFKOZnd5lZ+bs63O1jEaWJyjO5jeke5PKeSq MfPO13oZA5K8r4/bxYu4DX9+W86E6wTDkOpl1mTWNMwjsCU3XNjivu+H/EjeWMN6WjDH piZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CzbYk+q/gliRu1url5BCffOv4WCYgNgXM8PiUjiiGQc=; b=lzMHtqv0CsQt1raNn2d/iqhPy/taj2XIiJjVkeqr2mDFp1cOuqp9F8idyB2nr8LagU SCGuT9pCc0JlKd6nW9+coH0Hd709krlGXHv96fKmRLeInVGeKj5ROixdUu5a7rI9arBQ uy+24q6AONbbAWfqbM437EPUR2YA2UYBs0UvZxsN3UQVWUTvEZSvw5A4pbzzMKhwCNde aDDyuBMBXhyh0IUEjSiXdy+SF7wqTBFJU/nXIgVmt4LSkgEopnuYoHf0JKIr+p+Di4SE yA7022ouwmVgRadoD59sVbXkQ9G0V1JmCr0ora+WVXpg3cv8u2dby5VSQLd6xvRSX5qE MtdA== X-Gm-Message-State: AFeK/H1yUseuVBU8pxf5L8ZgqAuam/oL9WBVhjUI0nfz5mmacL7DWRbtIqhcrv4ugUP3HUZYbmn2Ly9Chg2cHQ== X-Received: by 10.157.1.134 with SMTP id e6mr20524347ote.168.1491585457585; Fri, 07 Apr 2017 10:17:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.63.179 with HTTP; Fri, 7 Apr 2017 10:17:37 -0700 (PDT) In-Reply-To: References: <201704062221.v36MLnr7092648@repo.freebsd.org> From: Xin LI Date: Fri, 7 Apr 2017 10:17:37 -0700 Message-ID: Subject: Re: svn commit: r316591 - head/sys/dev/tpm To: "Ngie Cooper (yaneurabeya)" Cc: "David E. O'Brien" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 17:17:39 -0000 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) wrote: > >> On Apr 6, 2017, at 15:21, David E. O'Brien 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