Attention is currently required from: Anastasia Klimchuk, Dmitry Zhadinets.
Peter Marheine has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/87341?usp=email )
Change subject: libflashrom: Add probing v2 which can find all mathching chips ......................................................................
Patch Set 7:
(5 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/87341/comment/578b7ae6_ad477593?usp... : PS7, Line 7: mathching typo
```suggestion libflashrom: Add probing v2 which can find all matching chips ```
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/87341/comment/e519db93_09ff9a72?usp... : PS7, Line 1056: const char *** const all_matched_names = malloc(sizeof(char***)); There's no reason to dynamically allocate this pointer, just pass a pointer to a `const char **` into the probe function.
``` const char **all_matched_names = NULL;
flashrom_flash_probe_v2(flashes, &all_matched_names, ...); ```
File include/libflashrom.h:
https://review.coreboot.org/c/flashrom/+/87341/comment/c8b780da_2e64503c?usp... : PS7, Line 294: needs to be freed with flashrom_data_free : * afterwards. Does the caller also need to free the buffer if an error is returned?
https://review.coreboot.org/c/flashrom/+/87341/comment/ffafe2cf_aeb37367?usp... : PS7, Line 306: pointer to the empty list if no chips found. Define what an empty list is: I think this is using NULL as a sentinel but the documentation should be very clear about it.
pointer to an array containing the names of all chips that were successfully probed, terminated with a NULL pointer. If no chips are found, the returned array contains a single NULL element. Callers must free the array once unused by calling flashrom_data_free.
File libflashrom.c:
https://review.coreboot.org/c/flashrom/+/87341/comment/a91c21c0_014b7782?usp... : PS7, Line 395: 0 Use NULL here so it's obvious this is a pointer.