Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46252 )
Change subject: mb/purism/librem_skl: Clean up FSP-M RCOMP settings ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46252/1/src/mainboard/purism/librem... File src/mainboard/purism/librem_skl/romstage.c:
https://review.coreboot.org/c/coreboot/+/46252/1/src/mainboard/purism/librem... PS1, Line 15: FSP_M_CONFIG *const mem_cfg = &mupd->FspmConfig;
shouldn't it be `const FSP_M_CONFIG *mem_cfg` ?
No, that would declare a read-only pointer and would not even build. To understand what `const` means on a pointer, you need to read the declaration backwards:
/* * mem_cfg is a 'const pointer' to 'FSP_M_CONFIG'. * Its address cannot be reassigned, but it can be * used to read and write to the pointed memory. */ FSP_M_CONFIG *const mem_cfg;
/* * mem_cfg is a 'pointer' to 'const FSP_M_CONFIG'. * Its address can be changed at will, but it can * only be used to read the memory it points to. */ const FSP_M_CONFIG *mem_cfg;
Jenkins failed the lint check because it does not understand `FSP_M_CONFIG`.