Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/45230 )
Change subject: dummyflasher.c: Factor out global state ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/45230/1/dummyflasher.c File dummyflasher.c:
https://review.coreboot.org/c/flashrom/+/45230/1/dummyflasher.c@922 PS1, Line 922: (struct emu_data *)flash->mst->par.data
As we have the block: […]
For clarity,
``` struct emu_data *emu_data get_data_from_context(struct flashctx *ctx) { if (dummy_buses_supported & (BUS_PARALLEL | BUS_LPC | BUS_FWH)) return (struct emu_data *)flash->mst->par.data; else if (dummy_buses_supported & BUS_SPI) return (struct emu_data *)flash->mst->spi.data;
return NULL; /* buses was set to BUS_NONE. */ } ```