Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35827 )
Change subject: drivers/pc80/rtc: Cache cmos_layout.bin region device ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35827/3/src/drivers/pc80/rtc/mc1468... File src/drivers/pc80/rtc/mc146818rtc.c:
https://review.coreboot.org/c/coreboot/+/35827/3/src/drivers/pc80/rtc/mc1468... PS3, Line 278: rdev = car_get_ptr(layout_rdev_p); As Elyes pointed out, something is funky here. We're not setting the memory behind `rdev` anymore, but only the local pointer variable.
I suggest making the parameter a `struct region_device **const`.
(I guess I should start a discussion about declaring `const` what can be declared `const`. This wouldn't have happened if `rdev` were immu- table.)