David Hendricks has uploaded this change for review. ( https://review.coreboot.org/21702
Change subject: nicintel_eeprom: Move variable declarations out of loops ......................................................................
nicintel_eeprom: Move variable declarations out of loops
A couple of C99-style variable declarations within loops are causing compilation failures on some systems (gcc 4.9.2-10 on Raspbian). This moves them to make gcc happy.
Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31 Signed-off-by: David Hendricks david.hendricks@gmail.com --- M nicintel_eeprom.c 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/02/21702/1
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c index e2fb584..e4a91ef 100644 --- a/nicintel_eeprom.c +++ b/nicintel_eeprom.c @@ -211,7 +211,8 @@ pci_mmio_writel(eewr, nicintel_eebar + EEWR);
programmer_delay(5); - for (int i = 0; i < MAX_ATTEMPTS; i++) + int i; + for (i = 0; i < MAX_ATTEMPTS; i++) if (pci_mmio_readl(nicintel_eebar + EEWR) & BIT(EEWR_DONE)) return 0; return -1; @@ -419,7 +420,8 @@ flup |= BIT(EE_FLUPD); pci_mmio_writel(flup, nicintel_eebar + EEC);
- for (int i = 0; i < MAX_ATTEMPTS; i++) + int i; + for (i = 0; i < MAX_ATTEMPTS; i++) if (pci_mmio_readl(nicintel_eebar + EEC) & BIT(EE_FLUDONE)) return 0;