Patchwork [U-Boot,06/18] Blackfin: uart: fix printf warning

login
register
mail settings
Submitter Mike Frysinger
Date June 28, 2011, 7:36 p.m.
Message ID <1309289787-7846-7-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/102467/
State Accepted
Commit f9aee4b4b65583149ed098c6908942d264db521b
Delegated to: Mike Frysinger
Headers show

Comments

Mike Frysinger - June 28, 2011, 7:36 p.m.
The code uses %i to printf a size_t when it should use %zu, otherwise
we get a warning from gcc about it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 arch/blackfin/cpu/serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/blackfin/cpu/serial.c b/arch/blackfin/cpu/serial.c
index 0252220..1124ffd 100644
--- a/arch/blackfin/cpu/serial.c
+++ b/arch/blackfin/cpu/serial.c
@@ -142,7 +142,7 @@  static int uart_getc(uint32_t uart_base)
 		printf("\tDLL=0x%x DLH=0x%x\n", dll, dlh);
 		do {
 			--cache_count;
-			printf("\t%3i: RBR=0x%02x LSR=0x%02x\n", cache_count,
+			printf("\t%3zu: RBR=0x%02x LSR=0x%02x\n", cache_count,
 				cached_rbr[cache_count], cached_lsr[cache_count]);
 		} while (cache_count > 0);
 		return -1;