From owner-dev-commits-src-all@freebsd.org Mon Apr 12 14:30:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 601075D3157; Mon, 12 Apr 2021 14:30:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJrkL6mh6z4XR8; Mon, 12 Apr 2021 14:30:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.66.148.124]) by shaw.ca with ESMTPA id VxaBlMYInHmS3VxaClXTiE; Mon, 12 Apr 2021 08:30:32 -0600 X-Authority-Analysis: v=2.4 cv=MaypB7zf c=1 sm=1 tr=0 ts=60745988 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=3YhXtTcJ-WEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=bXnWFbKItQCJmYZXJy0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 20484138C; Mon, 12 Apr 2021 07:30:30 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 13CEUUIq030729; Mon, 12 Apr 2021 07:30:30 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202104121430.13CEUUIq030729@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Mark Johnston cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: dfff37765ce4 - main - Rename struct device to struct _device In-reply-to: <202104121336.13CDaI5A029079@gitrepo.freebsd.org> References: <202104121336.13CDaI5A029079@gitrepo.freebsd.org> Comments: In-reply-to Mark Johnston message dated "Mon, 12 Apr 2021 13:36:18 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 12 Apr 2021 07:30:30 -0700 X-CMAE-Envelope: MS4xfA+xkx53nAN+fqbVbTeaxbtQDE1F8zlPjjt7/PHL3iNcnWgVK+VMCPHP/WXIuN4hW/hULpzboAe4OAhK4tHjaWNDHfBtnN6vYINaJj4xoHtRBWbmjK2Q 2xwIZFZK6WGzHCtojCj7UdOp0Xsf0IiQVvWGPiXsQ8VGSEeD1M0i9pRqqGKPAuRGaeBu/mgMditm0wgf2xMjyhLi/Z9E9siL/9PPhI5hjqn1KIR9Qn7Cns+O h4PZqABAb8cYyBFDPQLHUYOV1GDp+nqNEiH65VIgzlGZKCdRGpBZSE1GEp2S+rDIqSV4t8b6pVNmdgYiiBW5trb7RHJ0Vu0g1OXLhTGAvQ8= X-Rspamd-Queue-Id: 4FJrkL6mh6z4XR8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 14:30:35 -0000 In message <202104121336.13CDaI5A029079@gitrepo.freebsd.org>, Mark Johnston wri tes: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=dfff37765ce4ea4fd7db4d293b459dc8 > 4008f411 > > commit dfff37765ce4ea4fd7db4d293b459dc84008f411 > Author: Mark Johnston > AuthorDate: 2021-04-12 13:32:30 +0000 > Commit: Mark Johnston > CommitDate: 2021-04-12 13:32:30 +0000 > > Rename struct device to struct _device > > types.h defines device_t as a typedef of struct device *. struct device > is defined in subr_bus.c and almost all of the kernel uses device_t. > The LinuxKPI also defines a struct device, so type confusion can occur. > > This causes bugs and ambiguity for debugging tools. Rename the FreeBSD > struct device to struct _device. > > Reviewed by: gbe (man pages) > Reviewed by: rpokala, imp, jhb > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D29676 > --- > share/man/man9/device.9 | 2 +- > share/man/man9/rman.9 | 6 +++--- > sys/kern/subr_bus.c | 15 +++++++++------ > sys/powerpc/include/bus_dma.h | 4 +--- > sys/sys/pcpu.h | 2 +- > sys/sys/systm.h | 4 +--- > sys/sys/types.h | 2 +- > 7 files changed, 17 insertions(+), 18 deletions(-) Not that a name matters much but struct _device gives me a sense that the struct is ancillary. Whereas freebsd_device or fbsd_device is more descriptive and gives the struct the status it deserves. Then again, maybe it's just me. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.