
Attention is currently required from: Edward O'Callaghan, Angel Pons, Daniel Campello, Anastasia Klimchuk, Peter Marheine. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/33543 ) Change subject: layout: Introduce flashrom_layout_empty() ...................................................................... Patch Set 3: (2 comments) File libflashrom.h: https://review.coreboot.org/c/flashrom/+/33543/comment/6393345c_d19adf4c PS3, Line 111: int flashrom_layout_empty(struct flashrom_layout **, unsigned int count);
flashrom_layout_new might be clearer, since it's not obvious whether 'empty' means it will create a […] Full ack. I also wondered about this during rebase. :)
File libflashrom.c: https://review.coreboot.org/c/flashrom/+/33543/comment/363fc92e_217af8c4 PS3, Line 353: flashrom_layout_release(second_flashctx.default_layout);
It seems error-prone to require the caller to clean up the partially-initialized second_flashctx her […] It's actually fully initialized. In a follow-up I add the missing `free(second_flashctx.chip)`. We could add an interim function that does both, I suppose. But in the long run we should probably move the allocation of the flash context into probe_flash(), then flashrom_flash_release() could always be used. What do you think? (would probably be easier if we'd make the classic CLI use the libflashrom API first)
The underlying problem is that the probe_flash() API mixes pre- allocated with dynamically allocated things :-( -- To view, visit https://review.coreboot.org/c/flashrom/+/33543 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I2ae7246493ff592e631cce924777925c7825e398 Gerrit-Change-Number: 33543 Gerrit-PatchSet: 3 Gerrit-Owner: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz> Gerrit-Reviewer: Daniel Campello <campello@chromium.org> Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org> Gerrit-Reviewer: Thomas Heijligen <src@posteo.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@mailbox.org> Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Attention: Angel Pons <th3fanbus@gmail.com> Gerrit-Attention: Daniel Campello <campello@chromium.org> Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Attention: Peter Marheine <pmarheine@chromium.org> Gerrit-Comment-Date: Fri, 14 May 2021 16:12:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Peter Marheine <pmarheine@chromium.org> Gerrit-MessageType: comment