David Hendricks has uploaded this change for review.

View Change

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;

To view, visit change 21702. To unsubscribe, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Gerrit-Change-Number: 21702
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks@gmail.com>