i2c: tegra: Build warning fixes for 64-bit
authorThierry Reding <treding@nvidia.com>
Wed, 22 Jul 2015 21:33:22 +0000 (15:33 -0600)
committerTom Warren <twarren@nvidia.com>
Mon, 27 Jul 2015 22:53:57 +0000 (15:53 -0700)
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
drivers/i2c/tegra_i2c.c

index fc95646994892219747354039c9826268b64c43e..a4289788a65cb7ae8e9583a03299c2b1b992ef41 100644 (file)
@@ -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;