Attention is currently required from: Hung-Te Lin, Xi Chen, Paul Menzel, Xixi Chen. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61334 )
Change subject: soc/mediatek: Pass dram info to cbmem ......................................................................
Patch Set 22:
(2 comments)
File src/soc/mediatek/common/memory.c:
https://review.coreboot.org/c/coreboot/+/61334/comment/d2d4ca29_8228cc51 PS22, Line 123: p = (void *)((uintptr_t)mc + sizeof(*mc)); If you want to do something like this, please use
p = mc->channel;
or
p = &mc->channel[0];
instead of raw address arithmetic.
https://review.coreboot.org/c/coreboot/+/61334/comment/bf669a2b_17480602 PS22, Line 131: ++p; Please don't run two variables through the same loop unless really necessary. In this case, you can either write
for (p = mc->channel; p < &mc->channel[mc->num_channels]; p++)
or you just access `mc->channel[i].density` inside the loop and then you won't have any of these headaches from trying to get a pointer to the channel struct.