On Mon, Apr 12, 2021 at 07:30:30AM -0700, Cy Schubert wrote: > In message <202104121336.13cdai5a029...@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 <ma...@freebsd.org> > > AuthorDate: 2021-04-12 13:32:30 +0000 > > Commit: Mark Johnston <ma...@freebsd.org> > > 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.
That's really the intent. struct _device is the internal name and device_t should be used by consumers. > 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 <cy.schub...@cschubert.com> > FreeBSD UNIX: <c...@freebsd.org> Web: https://FreeBSD.org > NTP: <c...@nwtime.org> Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"