tech-kern archive

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

Re: Some changes to autoconfiguration APIs

> On Aug 1, 2021, at 11:10 AM, Martin Husemann <> wrote:
> On Sun, Aug 01, 2021 at 07:57:20AM -0700, Jason Thorpe wrote:
>> The situation hasn't changed.  I'm still waiting for concrete proposals.
> The concrete proposal is backout - if there is no better idea how to deal
> with it properly.

I have reworked it on the thorpej-cfargs2 branch.  It addresses the concerns about compile-time type checking by using an anonymous structure constructed in-line with the help of a variadic preprocessor macro (to save wear and tear on your fingers and keyboard that might otherwise occur because of annoying boilerplate syntax to construct the structure in-line).

Old example:

                c->c_dev = config_found(sc->sc_dev, &pa, pciprint,
                    CFARG_SUBMATCH, config_stdsubmatch,
                    CFARG_LOCATORS, locs,
                    CFARG_DEVHANDLE, devhandle,

New example:

                c->c_dev = config_found(sc->sc_dev, &pa, pciprint, 
                    CFARGS(.submatch = config_stdsubmatch,
                           .locators = locs, 
                           .devhandle = devhandle));


-- thorpej

Home | Main Index | Thread Index | Old Index