Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/72504 )
Change subject: jedec.c: Collapse probe_jedec() indirection ......................................................................
jedec.c: Collapse probe_jedec() indirection
Change-Id: I57c27bcf25c5d9ce10fb9c74d9be6ab3544ac7ba Signed-off-by: Edward O'Callaghan quasisec@google.com --- M jedec.c 1 file changed, 14 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/04/72504/1
diff --git a/jedec.c b/jedec.c index 697a239..b44b9c6 100644 --- a/jedec.c +++ b/jedec.c @@ -165,11 +165,12 @@ return 1; }
-static int probe_jedec_common(struct flashctx *flash, unsigned int mask) +int probe_jedec(struct flashctx *flash) { - chipaddr bios = flash->virtual_memory; + const chipaddr bios = flash->virtual_memory; const struct flashchip *chip = flash->chip; - bool shifted = (flash->chip->feature_bits & FEATURE_ADDR_SHIFTED); + const bool shifted = (flash->chip->feature_bits & FEATURE_ADDR_SHIFTED); + const unsigned int mask = getaddrmask(flash->chip); uint8_t id1, id2; uint32_t largeid1, largeid2; uint32_t flashcontent1, flashcontent2; @@ -518,12 +519,6 @@ return 0; }
-int probe_jedec(struct flashctx *flash) -{ - const unsigned int mask = getaddrmask(flash->chip); - return probe_jedec_common(flash, mask); -} - struct unlockblock { unsigned int size; unsigned int count;