Edward O'Callaghan has uploaded this change for review.

View Change

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;

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I57c27bcf25c5d9ce10fb9c74d9be6ab3544ac7ba
Gerrit-Change-Number: 72504
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-MessageType: newchange