Details
- Reviewers
imp kib - Commits
- rG45dc8e3c2c62: nvdimm: Use devclass_lookup to find devclasses.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/nvdimm/nvdimm_e820.c | ||
---|---|---|
370 | I more like this and less like string literal in the chunk for nvdimm.c. As I understand, it must be identical to the string pointed from the driver_t. Can we somehow reuse the pointer to the same string? [I have no idea why these changes are done, which I see are done systematically for all drivers. If what I said above just makes some plan harder, just disregard it at all and go ahead with the change. I have zero objections.] |
sys/dev/nvdimm/nvdimm_e820.c | ||
---|---|---|
370 | these changes == use of devclass_find() instead of referencing the explicitly declared devclass |
sys/dev/nvdimm/nvdimm_e820.c | ||
---|---|---|
370 | I did recently change some xen drivers to use 'driver->name' in the identify hooks which leaves the driver_t name field as the only bare string constant. I have not done a sweep to prefer that, but I could do so. For a module handler like this we could change the DRIVER_MODULE line to pass in the driver_t as the void *arg and then get to driver->name that way. The reason for the changes is that in the vast majority of drivers, the devclass argument to DRIVER_MODULE is unused, so I'm removing it from the API. (I've already deprecated it in head and plan to MFC the change that permits both old and new macro invocations to older branches). |
sys/dev/nvdimm/nvdimm_e820.c | ||
---|---|---|
370 | I prefer to have only one instance of the string literal, preferably one instance in the final object, not just in the source (with a macro). |
sys/dev/nvdimm/nvdimm.c | ||
---|---|---|
303–304 | So why not nvdimm_driver.name there? |
sys/dev/nvdimm/nvdimm.c | ||
---|---|---|
303–304 | Mostly because I need to move it earlier (or move this function later). I guess I can try to figure out the least terrible way to do that. |