Attention is currently required from: Felix Singer, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk.
View Change
1 comment:
File flashrom.c:
Patch Set #5, Line 948: if (bustype & (1 << i))
Oh that my question was a silly one, sorry. […]
Came back with fresh ideas, I see that it's possible to use a struct:
```
struct bus_type_info {
enum chipbustype type;
const char *name;
};
static const struct bus_type_info bustypes[] = {
{ BUS_PARALLEL, "Parallel, " },
{ BUS_LPC, "LPC, " },
{ BUS_FWH, "FWH, " },
{ BUS_SPI, "SPI, " },
{ BUS_PROG, "Programmer-specific, " },
};
```
And then:
```
for (unsigned int i = 0; i < ARRAY_SIZE(bustypes); i++)
{
if (bustype & bustypes[i].type) {
...
}
}
```
Looks like it resolves the problem that you mentioned. Do you think that's an appropriate implementation?
To view, visit change 73039. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I59b9044c99b4ba6c00d8c97f1e91af09d70dce2c
Gerrit-Change-Number: 73039
Gerrit-PatchSet: 6
Gerrit-Owner: Alexander Goncharov <chat@joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger@posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Comment-Date: Thu, 06 Apr 2023 13:42:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm@chromium.org>
Comment-In-Reply-To: Alexander Goncharov <chat@joursoir.net>
Gerrit-MessageType: comment