Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
aarch64 kernel build continued to pass with this in place. This hasn't been tested in execution, but I'm under the impression devclass_find() is MI so low risk.
Hm, isn't this more fragile, as we need to keep the string in driver_t in sync with the call to devclass_find()?
With the current approach there's no need for that, and any change to the naming of the _devclass variable will cause a compiler error.
I'm axing the devclass argument to DRIVER_MODULE since it is unused the vast majority of the time. If you'd rather not hardcode the string we could instead use driver->name instead of the hardcoded string.
Note however that we hardcode the driver name a few lines below in the call to BUS_ADD_CHILD, so if we are really worried about that then we need to change BUS_ADD_CHILD to also use driver->name.
Indeed. I would be fine if you take the opportunity to also fix those to use driver->name while doing the change. Thanks!
Not too surprising, but this continues to pass my build tests so this is likely okay (royger is the key reviewer here).