Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54044 )
Change subject: usbblaster_spi.c: Refactor singleton states into reentrant pattern
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File usbblaster_spi.c:
https://review.coreboot.org/c/flashrom/+/54044/comment/bfb66aee_114280f7
PS1, Line 165: static int usbblaster_shutdown(void *data)
: {
: free(data);
: return 0;
: }
> My own comment on this. […]
Seems fine to me. The ftdi resource leaks any way as it is never closed so the driver actually needed a shutdown func.
--
To view, visit https://review.coreboot.org/c/flashrom/+/54044
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia81f9f40c7eab430a8b304d0b197ce7c75bf5ace
Gerrit-Change-Number: 54044
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 11 May 2021 03:36:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54044 )
Change subject: usbblaster_spi.c: Refactor singleton states into reentrant pattern
......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1:
I have a message to reviewers, below. Thank you!
File usbblaster_spi.c:
https://review.coreboot.org/c/flashrom/+/54044/comment/9fd99056_b7c7b4a7
PS1, Line 165: static int usbblaster_shutdown(void *data)
: {
: free(data);
: return 0;
: }
My own comment on this.
I fully realise this patch is doing two things (removes global state and introduces shutdown function), spent some time thinking about it and decided this is the least of evil.
Without shutdown function there is no way to free the spi data, so it seems relevant here (vs adding empty shutdown function in a separate patch which serves no purpose).
Also usbblaster is doing neither cleanup on init failure nor cleanup on shutdown, but this definitely should go to a separate patch. Here I only free what I allocated myself.
In any case, if people think this should be changed/split, I can do it.
--
To view, visit https://review.coreboot.org/c/flashrom/+/54044
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia81f9f40c7eab430a8b304d0b197ce7c75bf5ace
Gerrit-Change-Number: 54044
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Tue, 11 May 2021 01:50:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54042 )
Change subject: stlinkv3_spi.c: Refactor singleton states into reentrant pattern
......................................................................
Patch Set 1:
(1 comment)
File stlinkv3_spi.c:
https://review.coreboot.org/c/flashrom/+/54042/comment/f745928a_bb768882
PS1, Line 533: stlinkv3_spi_open(sck_freq_kHz, stlinkv3_handle
> not actionable in this commit however I noticed the handle isn't closed on the error paths below.
Yes :\ on my observation, half of init error paths in the tree are not doing proper cleanup.
I think this is going to be my next project.
--
To view, visit https://review.coreboot.org/c/flashrom/+/54042
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id044661b864b506028720ea809bc524f0640469f
Gerrit-Change-Number: 54042
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Miklós Márton <martonmiklosqdev(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Tue, 11 May 2021 00:26:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: comment