[U-Boot] [PATCH 04/13] i2c: tegra: Build warning fixes for 64-bit
Thierry Reding
thierry.reding at gmail.com
Fri Mar 20 12:41:19 CET 2015
From: Thierry Reding <treding at nvidia.com>
Fix a couple of pointer to integer size mismatch warnings by casting
pointers to unsigned long rather than unsigned int.
Cc: Heiko Schocher <hs at denx.de>
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
drivers/i2c/tegra_i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index f4142870b304..78f125d88723 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -235,7 +235,7 @@ static int send_recv_packets(struct i2c_bus *i2c_bus,
if ((words == 1) && last_bytes) {
local = 0;
memcpy(&local, dptr, last_bytes);
- } else if ((unsigned)dptr & 3) {
+ } else if ((unsigned long)dptr & 3) {
memcpy(&local, dptr, sizeof(u32));
} else {
local = *wptr;
@@ -258,7 +258,7 @@ static int send_recv_packets(struct i2c_bus *i2c_bus,
local = readl(&control->rx_fifo);
if ((words == 1) && last_bytes)
memcpy(dptr, (char *)&local, last_bytes);
- else if ((unsigned)dptr & 3)
+ else if ((unsigned long)dptr & 3)
memcpy(dptr, &local, sizeof(u32));
else
*wptr = local;
--
2.3.2
More information about the U-Boot
mailing list