From owner-svn-src-head@freebsd.org Sat Apr 8 16:59:31 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 61851D3575A; Sat, 8 Apr 2017 16:59:31 +0000 (UTC) (envelope-from obrien@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EB5AB81; Sat, 8 Apr 2017 16:59:31 +0000 (UTC) (envelope-from obrien@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 664) id 67ED541A6; Sat, 8 Apr 2017 16:59:30 +0000 (UTC) Date: Sat, 8 Apr 2017 16:59:30 +0000 From: David O'Brien To: "Ngie Cooper (yaneurabeya)" Cc: "David E. O'Brien" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316591 - head/sys/dev/tpm Message-ID: <20170408165930.GA22358@freefall.freebsd.org> Reply-To: obrien@freebsd.org References: <201704062221.v36MLnr7092648@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 12.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 User-Agent: Mutt/1.7.1 (2016-10-04) 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: Sat, 08 Apr 2017 16:59:31 -0000 On Thu, Apr 06, 2017 at 10:19:48PM -0700, Ngie Cooper (yaneurabeya) wrote: > > On Apr 6, 2017, at 15:21, David E. O'Brien wrote: > Hi David, > I think you meant to delete the other piece of code (__FreeBSD__ is > always defined). Hi Ngie, I removed 100% dead code. This was a block of code that could never be active. The code supported two cases: 1. __FreeBSD__ being defined 2. __FreeBSD__ not being defined. No attention was paid to any other (such as __OpenBSD__). The code I deleted could never be activated. So it was an obvious thing to remove even if the OpenBSD support is kept. I have a patch to unifdef(1) the code at: https://reviews.freebsd.org/D10321 > Also, why delete lines that might make it harder to backport changes > from OpenBSD? It is hard to read this code and follow its flow with the multiple versions of the same functions. I ported this driver to Junos on MIPS and it was much simpler to read, enhance, and debug without the OpenBSD bits. Also, there is no evidence this still works on OpenBSD. OpenBSD never accepted this driver, and instead wrote their own minimal driver (sys/dev/acpi/tpm.c for suspending the device). OpenBSD has no interest in this driver. So we're carrying around needless baggage. -- -- David (obrien@FreeBSD.org)