Shiyu Sun has uploaded this change for review.

View Change

lspcon_i2c_spi.c: Fix style

Avoid define the variable i at the for loop statement.

BUG=None
TEST=None

Signed-off-by: Shiyu Sun <sshiyu@chromium.org>
Change-Id: I4068ae7bdf6e053606cb063f7781dbb2d77792ff
---
M lspcon_i2c_spi.c
1 file changed, 2 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/74/47874/1
diff --git a/lspcon_i2c_spi.c b/lspcon_i2c_spi.c
index 7b9f1c0..f468031 100644
--- a/lspcon_i2c_spi.c
+++ b/lspcon_i2c_spi.c
@@ -377,6 +377,7 @@
unsigned int start, unsigned int len)
{
int ret = 0;
+ unsigned int i;
if (start & 0xff)
return default_spi_write_256(flash, buf, start, len);

@@ -389,7 +390,7 @@
ret |= lspcon_i2c_spi_enable_hw_write(fd);
ret |= lspcon_i2c_clt2_spi_reset(fd);

- for (unsigned int i = 0; i < len; i += PAGE_SIZE) {
+ for (i = 0; i < len; i += PAGE_SIZE) {
ret |= lspcon_i2c_spi_map_page(fd, start + i);
ret |= lspcon_i2c_spi_write_page(fd, buf + i, min(len - i, PAGE_SIZE));
}

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4068ae7bdf6e053606cb063f7781dbb2d77792ff
Gerrit-Change-Number: 47874
Gerrit-PatchSet: 1
Gerrit-Owner: Shiyu Sun <sshiyu@google.com>
Gerrit-MessageType: newchange