tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] style(5): No struct typedefs



> On Jul 11, 2023, at 3:17 AM, Taylor R Campbell <riastradh%NetBSD.org@localhost> wrote:
> 
> If we used `struct bus_dma_tag *' instead, the forward declaration
> could be `struct bus_dma_tag;' instead of having to pull in all of
> sys/bus.h, _and_ the C compiler would actually check types.

In the original design, it’s not always a struct.  That was the whole point of using a more abstract type.

If you want to hide the struct'ness in a machdep header file, fine, but I completely disagree with the notion of requiring the use of the “struct” keyword all over the place.

-- thorpej



Home | Main Index | Thread Index | Old Index