Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41363 )
Change subject: device: avoid fixed resources hanging off pci domain device ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41363/2/src/device/device.c File src/device/device.c:
https://review.coreboot.org/c/coreboot/+/41363/2/src/device/device.c@935 PS2, Line 935: if (dev->path.type == DEVICE_PATH_DOMAIN) { : initialize_domain_memranges(ranges, res, type); : constrain_domain_resources(dev, ranges, type); : } else { : initialize_bridge_memranges(ranges, res, type); : } I've had only a quick look at the callers. But it looks like they always know if we deal with a domain or not (and then need a non-const pointer or not). So alternatively to removing all `const`, one could split this function up, I guess. But it would probably only help us with a single `const`...
Haven't yet figured out, why this is a two-in-one function.