public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/13] i2c: tegra: Build warning fixes for 64-bit
Date: Fri, 20 Mar 2015 12:41:19 +0100	[thread overview]
Message-ID: <1426851688-6429-4-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1426851688-6429-1-git-send-email-thierry.reding@gmail.com>

From: Thierry Reding <treding@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@denx.de>
Signed-off-by: Thierry Reding <treding@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

  parent reply	other threads:[~2015-03-20 11:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 11:41 [U-Boot] [PATCH 01/13] ARM: tegra: Fix build failures and warnings on 64-bit Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 02/13] usb: Build warning fixes for 64-bit Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 03/13] dfu: " Thierry Reding
2015-03-23 10:06   ` Lukasz Majewski
2015-03-20 11:41 ` Thierry Reding [this message]
2015-03-20 11:41 ` [U-Boot] [PATCH 05/13] mmc: tegra: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 06/13] net: rtl8169: " Thierry Reding
2015-03-20 18:32   ` Joe Hershberger
2015-03-20 11:41 ` [U-Boot] [PATCH 07/13] pci: tegra: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 08/13] usb: eth: asix: " Thierry Reding
2015-03-25 11:42   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 09/13] usb: ci_udc: " Thierry Reding
2015-03-20 16:10   ` Stephen Warren
2015-03-25 11:49   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 10/13] usb: mass-storage: " Thierry Reding
2015-03-23 10:20   ` Lukasz Majewski
2015-03-23 10:23   ` Lukasz Majewski
2015-03-25 11:43   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 11/13] usb: ehci-hcd: " Thierry Reding
2015-03-25 11:50   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 12/13] usb: ehci-tegra: " Thierry Reding
2015-03-25 11:42   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 13/13] fdt: " Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426851688-6429-4-git-send-email-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox