Edward O'Callaghan submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Sam McNally: Looks good to me, approved Anastasia Klimchuk: Looks good to me, but someone else must approve
dummyflasher.c: Use BUS_NONSPI where appropriate

The BUS_NONSPI is short-hand and is intended to be
the collection, therefore use it.

BUG=none
BRANCH=none
TEST=builds

Change-Id: I368e8865c446d9b9ffd580c90eac034850dd53d8
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54356
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Sam McNally <sammc@google.com>
---
M dummyflasher.c
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dummyflasher.c b/dummyflasher.c
index d434eec..e19e46c 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -175,7 +175,7 @@

static struct emu_data* get_data_from_context(const struct flashctx *flash)
{
- if (dummy_buses_supported & (BUS_PARALLEL | BUS_LPC | BUS_FWH))
+ if (dummy_buses_supported & BUS_NONSPI)
return (struct emu_data *)flash->mst->par.data;
else if (dummy_buses_supported & BUS_SPI)
return (struct emu_data *)flash->mst->spi.data;
@@ -1025,9 +1025,9 @@
free(data);
return 1;
}
- if (dummy_buses_supported & (BUS_PARALLEL | BUS_LPC | BUS_FWH))
+ if (dummy_buses_supported & BUS_NONSPI)
register_par_master(&par_master_dummy,
- dummy_buses_supported & (BUS_PARALLEL | BUS_LPC | BUS_FWH));
+ dummy_buses_supported & BUS_NONSPI);
if (dummy_buses_supported & BUS_SPI)
register_spi_master(&spi_master_dummyflasher, data);


To view, visit change 54356. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I368e8865c446d9b9ffd580c90eac034850dd53d8
Gerrit-Change-Number: 54356
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Sam McNally <sammc@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged