tech-kern archive

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

Re: Some changes to autoconfiguration APIs



On Wed, Aug 04, 2021 at 05:52:46PM -0700, Jason Thorpe wrote:
 > Old example:
 > 
 >                 c->c_dev = config_found(sc->sc_dev, &pa, pciprint,
 >                     CFARG_SUBMATCH, config_stdsubmatch,
 >                     CFARG_LOCATORS, locs,
 >                     CFARG_DEVHANDLE, devhandle,
 >                     CFARG_EOL);
 > 
 > New example:
 > 
 >                 c->c_dev = config_found(sc->sc_dev, &pa, pciprint, 
 >                     CFARGS(.submatch = config_stdsubmatch,
 >                            .locators = locs, 
 >                            .devhandle = devhandle));
 > 
 > Acceptable?

Seems like a definite improvement as long as .submatch and whatnot are
typed (and not (void *)).

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index