The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d652801574f7b1aaf2a9345840861ce5d3768c85
commit d652801574f7b1aaf2a9345840861ce5d3768c85 Author: Andrew Turner <[email protected]> AuthorDate: 2024-10-29 11:06:57 +0000 Commit: Andrew Turner <[email protected]> CommitDate: 2024-10-29 11:06:57 +0000 bus: Fix the non-debug build We read the rman type twice. Replace the second call to rman_get_type with the value we already have. Reported by: bapt, Herbert J. Skuhra <[email protected]> Sponsored by: Arm Ltd --- sys/kern/subr_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 681971df4307..8fec2b3de139 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4367,7 +4367,7 @@ bus_generic_rman_activate_resource(device_t dev, device_t child, if (error != 0) return (error); - switch (rman_get_type(r)) { + switch (type) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: if ((rman_get_flags(r) & RF_UNMAPPED) == 0) {
