Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44276 )
Change subject: drivers/spi/tpm: Re-organize the TPM Initialization
......................................................................
Patch Set 2: Code-Review+1
(2 comments)
https://review.coreboot.org/c/coreboot/+/44276/2/src/drivers/spi/tpm/tpm.c
File src/drivers/spi/tpm/tpm.c:
https://review.coreboot.org/c/coreboot/+/44276/2/src/drivers/spi/tpm/tpm.c@4...
PS2, Line 450: } while (vstr[chunk_count * chunk_size - 1] &&
: (chunk_count + 1) * chunk_size < sizeof(vstr));
I find this loop construct overly complex for what it is trying to achieve. At minimum I would take the upper bound portion of this boundary predicate and make it into a if-break construction in the loop body.
https://review.coreboot.org/c/coreboot/+/44276/2/src/drivers/spi/tpm/tpm.c@4...
PS2, Line 452: 0
'\0' as vstr is char typed.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/44276
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I94fef8ed813f4c0482b23ba513465faaf1ceae9f
Gerrit-Change-Number: 44276
Gerrit-PatchSet: 2
Gerrit-Owner: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Reviewer: Christian Walter
christian.walter@9elements.com
Gerrit-Reviewer: Edward O'Callaghan
quasisec@chromium.org
Gerrit-Reviewer: Furquan Shaikh
furquan@google.com
Gerrit-Reviewer: Jes Klinke
jbk@chromium.org
Gerrit-Reviewer: Nick Vaccaro
nvaccaro@google.com
Gerrit-Reviewer: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Julius Werner
jwerner@chromium.org
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Fri, 14 Aug 2020 08:56:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment