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 Fri, Jul 14, 2023 at 01:00:26AM +0200, Johnny Billquist wrote:
> Using "typedef struct bus_dma_tag *" instead of "typedef void *" will do the
> same thing. That is no reason at all why to skip the typedef.

We want to avoid having to #include the header where that typedef lives.

The typedef itself buys you nothing but a few charactes less to type,
but it introduces another layer of indirection where you could (accidently)
introduce inconsistencies (unless you include it from some common
header, which brings us back to the start).

Martin


Home | Main Index | Thread Index | Old Index