From: Thierry Reding Date: Wed, 22 Jul 2015 21:33:22 +0000 (-0600) Subject: i2c: tegra: Build warning fixes for 64-bit X-Git-Tag: v2025.01-rc5-pxa1908~12420^2~16 X-Git-Url: http://git.dujemihanovic.xyz/img/%7B%7B%20%24style.RelPermalink%20%7D%7D?a=commitdiff_plain;h=8e67c5d0475f65031e5e1687a816eea4eb609164;p=u-boot.git i2c: tegra: Build warning fixes for 64-bit Signed-off-by: Thierry Reding Signed-off-by: Tom Warren Signed-off-by: Stephen Warren Acked-by: Tom Rini Reviewed-by: Simon Glass Signed-off-by: Tom Warren --- diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c index fc95646994..a4289788a6 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;