Patch set 1:Code-Review +1
View Change
2 comments:
File trace.c:
Patch Set #1, Line 210:
/* Special commands */
switch (spi_command) {
case 0xb7:
address_mode = 4;
break;
case 0xe9:
address_mode = 3;
break;
}
Huh, this part is indented with spaces
Patch Set #1, Line 224:
if (address_mode == 3)
address = (data[i * 8 + 5] << 16) + (data[i * 8 + 6] << 8) + data[i * 8 + 7];
else
address = (data[i * 8 + 5] << 24) + (data[i * 8 + 6] << 16) + (data[i * 8 + 7] << 8) + data[i * 8 + 8];
How about:
address = 0;
for (int n = 0; n < address_mode; n++) {
address <<= 8;
address |= data[i * 8 + 4 + n];
}
To view, visit change 48553. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: em100
Gerrit-Branch: master
Gerrit-Change-Id: Iec9f36356eb7e612a909855cda85dc0ce1b5adc0
Gerrit-Change-Number: 48553
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Sat, 12 Dec 2020 09:58:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment