All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 07/11] net: designware: Fix build warnings
Date: Thu,  3 Sep 2015 04:43:43 -0700	[thread overview]
Message-ID: <1441280627-29714-8-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1441280627-29714-1-git-send-email-bmeng.cn@gmail.com>

When building dm version of designware eth driver on a platform
with 64-bit phys_addr_t, it reports the following warnings:

  drivers/net/designware.c: In function 'designware_eth_probe':
  drivers/net/designware.c:599:2:
    warning: format '%lx' expects argument of type 'long unsigned int',
    but argument 3 has type 'phys_addr_t' [-Wformat]
  drivers/net/designware.c:600:21:
    warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  drivers/net/designware.c:601:21:
    warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

This commit fixes the build warnings.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 drivers/net/designware.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index d9cb507..ae78d21 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -562,12 +562,12 @@ static int designware_eth_probe(struct udevice *dev)
 {
 	struct eth_pdata *pdata = dev_get_platdata(dev);
 	struct dw_eth_dev *priv = dev_get_priv(dev);
+	u32 iobase = pdata->iobase;
 	int ret;
 
-	debug("%s, iobase=%lx, priv=%p\n", __func__, pdata->iobase, priv);
-	priv->mac_regs_p = (struct eth_mac_regs *)pdata->iobase;
-	priv->dma_regs_p = (struct eth_dma_regs *)(pdata->iobase +
-			DW_DMA_BASE_OFFSET);
+	debug("%s, iobase=%x, priv=%p\n", __func__, iobase, priv);
+	priv->mac_regs_p = (struct eth_mac_regs *)iobase;
+	priv->dma_regs_p = (struct eth_dma_regs *)(iobase + DW_DMA_BASE_OFFSET);
 	priv->interface = pdata->phy_interface;
 
 	dw_mdio_init(dev->name, priv->mac_regs_p);
-- 
1.8.2.1

  parent reply	other threads:[~2015-09-03 11:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 11:43 [U-Boot] [PATCH v3 00/11] x86: quark: Convert to driver model Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 01/11] x86: quark: Optimize MRC execution time Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 02/11] x86: quark: Avoid chicken and egg problem Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 03/11] x86: Enable PCIe controller on quark/galileo Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 04/11] x86: Convert to use driver model pci " Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 05/11] x86: quark: Add USB PHY initialization support Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 06/11] x86: galileo: Convert to use CONFIG_DM_USB Bin Meng
2015-09-03 11:43 ` Bin Meng [this message]
2015-09-03 11:43 ` [U-Boot] [PATCH v3 08/11] dm: pci: Add an inline API to test if a device is on a PCI bus Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 09/11] net: designware: Add support to PCI designware devices Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 10/11] x86: Convert to use driver model eth on quark/galileo Bin Meng
2015-09-03 11:43 ` [U-Boot] [PATCH v3 11/11] x86: quark: Add PCIe/USB static register programming after memory init Bin Meng

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=1441280627-29714-8-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.