[coreboot] Patch set updated for coreboot: 1ef774a Fix printk types in SPI flash drivers
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Fri May 25 21:49:22 CEST 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1041
-gerrit
commit 1ef774ab8232f66de72fb2dcd796ee819476b213
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Mon May 14 13:52:32 2012 -0700
Fix printk types in SPI flash drivers
- use %zu instead of %zd for size_t (%zd is for ssize_t)
- use %x instead of %lx for u32
- break some long lines to avoid commit hook trouble
Change-Id: Idfad716523dbcd2a595d26317240e972b5253e8b
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
src/drivers/spi/eon.c | 2 +-
src/drivers/spi/macronix.c | 7 ++++---
src/drivers/spi/spansion.c | 3 ++-
src/drivers/spi/sst.c | 2 +-
src/drivers/spi/stmicro.c | 3 ++-
src/drivers/spi/winbond.c | 8 ++++----
6 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/drivers/spi/eon.c b/src/drivers/spi/eon.c
index 4056953..b7c0630 100644
--- a/src/drivers/spi/eon.c
+++ b/src/drivers/spi/eon.c
@@ -86,7 +86,7 @@ static int eon_write(struct spi_flash *flash,
cmd[3] = byte_addr;
printk(BIOS_SPEW,
- "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zd\n",
+ "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zu\n",
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
ret = spi_flash_cmd(flash->spi, CMD_EN25Q128_WREN, NULL, 0);
diff --git a/src/drivers/spi/macronix.c b/src/drivers/spi/macronix.c
index 130e746..abf59c9 100644
--- a/src/drivers/spi/macronix.c
+++ b/src/drivers/spi/macronix.c
@@ -141,7 +141,8 @@ static int macronix_write(struct spi_flash *flash,
cmd[2] = (offset >> 8) & 0xff;
cmd[3] = offset & 0xff;
- printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zd\n",
+ printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
+ " chunk_len = %zu\n",
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
ret = spi_flash_cmd(flash->spi, CMD_MX25XX_WREN, NULL, 0);
@@ -165,8 +166,8 @@ static int macronix_write(struct spi_flash *flash,
byte_addr = 0;
}
- printk(BIOS_INFO, "SF: Macronix: Successfully programmed %zu bytes @ 0x%lx\n",
- len, offset - len);
+ printk(BIOS_INFO, "SF: Macronix: Successfully programmed %zu bytes @"
+ " 0x%lx\n", len, (unsigned long)(offset - len));
spi_release_bus(flash->spi);
return ret;
diff --git a/src/drivers/spi/spansion.c b/src/drivers/spi/spansion.c
index a4f370a..5479cae 100644
--- a/src/drivers/spi/spansion.c
+++ b/src/drivers/spi/spansion.c
@@ -162,7 +162,8 @@ static int spansion_write(struct spi_flash *flash,
cmd[2] = page_addr;
cmd[3] = byte_addr;
- printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zd\n",
+ printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
+ " chunk_len = %zu\n",
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
ret = spi_flash_cmd(flash->spi, CMD_S25FLXX_WREN, NULL, 0);
diff --git a/src/drivers/spi/sst.c b/src/drivers/spi/sst.c
index c5bec12..8245f72 100644
--- a/src/drivers/spi/sst.c
+++ b/src/drivers/spi/sst.c
@@ -195,7 +195,7 @@ sst_write(struct spi_flash *flash, u32 offset, size_t len, const void *buf)
done:
printk(BIOS_INFO, "SF: SST: program %s %zu bytes @ 0x%lx\n",
- ret ? "failure" : "success", len, offset - actual);
+ ret ? "failure" : "success", len, (unsigned long)offset - actual);
spi_release_bus(flash->spi);
return ret;
diff --git a/src/drivers/spi/stmicro.c b/src/drivers/spi/stmicro.c
index 8cbdad5..9322c06 100644
--- a/src/drivers/spi/stmicro.c
+++ b/src/drivers/spi/stmicro.c
@@ -163,7 +163,8 @@ static int stmicro_write(struct spi_flash *flash,
cmd[2] = page_addr;
cmd[3] = byte_addr;
- printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zd\n",
+ printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
+ " chunk_len = %zu\n",
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
ret = spi_flash_cmd(flash->spi, CMD_M25PXX_WREN, NULL, 0);
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c
index 65818d5..a2feb7a 100644
--- a/src/drivers/spi/winbond.c
+++ b/src/drivers/spi/winbond.c
@@ -130,8 +130,8 @@ static int winbond_write(struct spi_flash *flash,
cmd[1] = (offset >> 16) & 0xff;
cmd[2] = (offset >> 8) & 0xff;
cmd[3] = offset & 0xff;
- printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %ld\n",
- buf + actual,
+ printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
+ " chunk_len = %zu\n", buf + actual,
cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
ret = spi_flash_cmd(flash->spi, CMD_W25_WREN, NULL, 0);
@@ -155,8 +155,8 @@ static int winbond_write(struct spi_flash *flash,
byte_addr = 0;
}
- printk(BIOS_INFO, "SF: Winbond: Successfully programmed %zu bytes @ 0x%lx\n",
- len, offset - len);
+ printk(BIOS_INFO, "SF: Winbond: Successfully programmed %zu bytes @"
+ " 0x%lx\n", len, (unsigned long)(offset - len));
ret = 0;
out:
More information about the coreboot
mailing list