Add wrapper inline functions for bus_alloc_resource* that accept a
resource ID by value (instead of a pointer). The rest of the bus
resource API (outside of compat shims) does not accept resource IDs as
arguments, but instead obtains the resource ID from the resource
itself when needed. As such, there is no reason to return any
potentially modified resource IDs to the caller.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
This will also need a __FreeBSD_version bump. I intend to merge this back to the stable branches that support the newer bus_release_resource such as stable/14 and stable/15.
Comment Actions
Nice transition work with _Generic.
| sys/sys/bus.h | ||
|---|---|---|
| 644 | Do we want to mark this for removal in 16 sometime? | |
| sys/sys/bus.h | ||
|---|---|---|
| 644 | There's not a good way to mark it. I plan to remove the earlier compat shims below this in 16 and when fixing drivers to stop passing type/rid to the other functions, I will probably fix them for this change at the same time, so probably I will be able to remove then. | |