From owner-svn-src-all@FreeBSD.ORG Sun Oct 27 16:46:28 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 410A1161; Sun, 27 Oct 2013 16:46:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 135C6205F; Sun, 27 Oct 2013 16:46:27 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VaTTp-000A7Z-3y; Sun, 27 Oct 2013 16:46:21 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r9RGkIcn048995; Sun, 27 Oct 2013 10:46:18 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19SXmZD2b+cvpr2xg7Rymm8 Subject: Re: svn commit: r257199 - in head/sys/arm: allwinner arm broadcom/bcm2835 freescale/imx include lpc mv mv/orion rockchip sa11x0 samsung/exynos tegra ti ti/omap4/pandaboard versatile xilinx xscale/i8032... From: Ian Lepore To: Bruce Evans In-Reply-To: <20131028015840.V929@besplex.bde.org> References: <201310270051.r9R0pl3j024025@svn.freebsd.org> <20131028015840.V929@besplex.bde.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 27 Oct 2013 10:46:18 -0600 Message-ID: <1382892378.1170.170.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Oct 2013 16:46:28 -0000 On Mon, 2013-10-28 at 03:07 +1100, Bruce Evans wrote: > > > Modified: head/sys/arm/allwinner/a10_machdep.c > > ============================================================================== > > --- head/sys/arm/allwinner/a10_machdep.c Sat Oct 26 23:41:11 2013 (r257198) > > +++ head/sys/arm/allwinner/a10_machdep.c Sun Oct 27 00:51:46 2013 (r257199) > > @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); > > #include > > #include /* For trapframe_t, used in */ > > #include > > -#include > > > > #include > > Some other style bugs are visible in the patch. > > Saying what an include is for is a bogus "come from" comment. Such comments > are usually rotten, and the above is no exception. trapframe_t is a > style bug (an "opaque" type that must be visible to use it) that still > exists (only arm has it, at least now). But arm/machine/machdep.h doesn't > use it now. I don't know if machine/machdep.h needed to use it. But the > optimization of passing full trap frames without copying them has been lost > because it depended on undefined behaviour in C. Everything now passes > pointers to trap frames instead. arm/machine/machdep.h spells the pointers > correctly as "struct trapframe *" after forward-declaring an incomplete > "struct trapframe", so it doesn't actually use trapframe_t. Perhaps the > include is now included for some unclaimed reason. > > The "come from" comment bogosity was mine, although the trapframe_t unhappiness came first. I had at one time started flagged them as a baby step towards cleaning them all up, then did nothing for months. You may have noticed that I finally finished the job of eliminating frame.h from most of the places that didn't actually need it in r257200. While doing that, I noticed a whole lot of other includes in arm source code that just aren't needed (things like cpu.h and intr.h in virtually every file). So much of our arm code gets created by wholesale pasting some other code and then hacking. That's not completely invalid, I do it myself sometimes, but I generally start by commenting out most of the includes, then uncomment until it compiles. I didn't realize only arm had a trapframe_t. Now I'm inclined to just seek and destroy the remnants of it. -- Ian