Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/31247 )
Change subject: layout.c: Don't use global variables for included regions ......................................................................
Patch Set 1: Code-Review+1
(6 comments)
Just style comments...
https://review.coreboot.org/#/c/31247/1/layout.h File layout.h:
https://review.coreboot.org/#/c/31247/1/layout.h@65 PS1, Line 65: const The latter `const` should be dropped (caller doesn't care if it's const inside the implementation).
https://review.coreboot.org/#/c/31247/1/layout.h@65 PS1, Line 65: int process_include_args(const struct layout_include_args * const args, struct flashrom_layout *const l); I would prefer to have the output parameter first.
https://review.coreboot.org/#/c/31247/1/layout.h@65 PS1, Line 65: const same
https://review.coreboot.org/#/c/31247/1/layout.c File layout.c:
https://review.coreboot.org/#/c/31247/1/layout.c@109 PS1, Line 109: while(tmp) { missing space
https://review.coreboot.org/#/c/31247/1/layout.c@117 PS1, Line 117: tmp = malloc(sizeof(struct layout_include_args)); null-check
https://review.coreboot.org/#/c/31247/1/layout.c@144 PS1, Line 144: spurious space between `*` and `const`