From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:19:02 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 29BA8B3A; Tue, 30 Jul 2013 19:19:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9F752644; Tue, 30 Jul 2013 19:19:01 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3CC61B94B; Tue, 30 Jul 2013 15:19:00 -0400 (EDT) From: John Baldwin To: obrien@freebsd.org Subject: Re: svn commit: r253618 - head/sys/dev/usb/gadget Date: Tue, 30 Jul 2013 15:17:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201307241832.r6OIWFGc074918@svn.freebsd.org> <201307241529.35175.jhb@freebsd.org> <20130730190207.GC63635@dragon.NUXI.org> In-Reply-To: <20130730190207.GC63635@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201307301517.49989.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 30 Jul 2013 15:19:00 -0400 (EDT) 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: Tue, 30 Jul 2013 19:19:02 -0000 On Tuesday, July 30, 2013 3:02:07 pm David O'Brien wrote: > On Wed, Jul 24, 2013 at 03:29:34PM -0400, John Baldwin wrote: > > On Wednesday, July 24, 2013 2:32:15 pm David E. O'Brien wrote: > > > per style(9): > > > Kernel include files (i.e. sys/*.h) come first; normally, include > > > OR , but not both. includes > > > , and it is okay to depend on that. > > > > This is not fully correct. The consistent style throughout the tree when > > using _FBSDID() is: > > > > #include > > __FBSDID() > > > > #include > > ... > > > > Please fix these to match that. It might not be a bad idea to document the > > __FBSDID() practice in style.9 while you are at it. > > Hi John, > As BDE mentioned, the text [still] says it is OK to depend on > and including . He also noted that the style is documented by example, and that much of style(9) is done by example. > I was one of the ones that put __FBSDID() in much of our code. I used > a script to add the two lines: > #include > __FBSDID("$FreeBSD$"); > > I did it this way so as to not break the "but not both" rule for > and . In otherwords my script wasn't > smart enough to see if or was already > being included and put the '__FBSDID("$FreeBSD$");' right below it. > > I don't feel > #include > __FBSDID("$FreeBSD$"); > > #include > > is against style(9). Nothing else uses this style, and a whole lot of code does use the other convention. At this point the other convention is the de facto style. If that is the consequence of your script, so be it. At this point that is a whole lot of water under the bridge, and the most readable thing is to be consistent with all the other code in the tree, not start a new pattern. -- John Baldwin