diff options
| author | Bin Meng <[email protected]> | 2021-01-31 20:36:02 +0800 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2021-02-03 03:38:41 -0700 |
| commit | 673625c45938dc9616e5cdb64bbd6459fd74fb00 (patch) | |
| tree | badd263164800e967165bd6f5a5138315b4caf10 | |
| parent | b7324b5d5380cddbac7f17bc6229776763c08ee4 (diff) | |
net: ftmac100: Cast priv->iobase with uintptr_t
priv->iobase was declared as phys_addr_t which is now a 64-bit
address. In a 32-bit build, this causes the following warning
seen when building ftmac100.c:
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Cast priv->iobase with uintptr_t.
Signed-off-by: Bin Meng <[email protected]>
| -rw-r--r-- | drivers/net/ftmac100.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index 0d672374fda..fc578b03752 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -35,7 +35,7 @@ struct ftmac100_data { */ static void ftmac100_reset(struct ftmac100_data *priv) { - struct ftmac100 *ftmac100 = (struct ftmac100 *)priv->iobase; + struct ftmac100 *ftmac100 = (struct ftmac100 *)(uintptr_t)priv->iobase; debug ("%s()\n", __func__); @@ -56,7 +56,7 @@ static void ftmac100_reset(struct ftmac100_data *priv) static void ftmac100_set_mac(struct ftmac100_data *priv , const unsigned char *mac) { - struct ftmac100 *ftmac100 = (struct ftmac100 *)priv->iobase; + struct ftmac100 *ftmac100 = (struct ftmac100 *)(uintptr_t)priv->iobase; unsigned int maddr = mac[0] << 8 | mac[1]; unsigned int laddr = mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5]; @@ -71,7 +71,7 @@ static void ftmac100_set_mac(struct ftmac100_data *priv , */ static void _ftmac100_halt(struct ftmac100_data *priv) { - struct ftmac100 *ftmac100 = (struct ftmac100 *)priv->iobase; + struct ftmac100 *ftmac100 = (struct ftmac100 *)(uintptr_t)priv->iobase; debug ("%s()\n", __func__); writel (0, &ftmac100->maccr); } @@ -81,7 +81,7 @@ static void _ftmac100_halt(struct ftmac100_data *priv) */ static int _ftmac100_init(struct ftmac100_data *priv, unsigned char enetaddr[6]) { - struct ftmac100 *ftmac100 = (struct ftmac100 *)priv->iobase; + struct ftmac100 *ftmac100 = (struct ftmac100 *)(uintptr_t)priv->iobase; struct ftmac100_txdes *txdes = priv->txdes; struct ftmac100_rxdes *rxdes = priv->rxdes; unsigned int maccr; @@ -186,7 +186,7 @@ static int __ftmac100_recv(struct ftmac100_data *priv) */ static int _ftmac100_send(struct ftmac100_data *priv, void *packet, int length) { - struct ftmac100 *ftmac100 = (struct ftmac100 *)priv->iobase; + struct ftmac100 *ftmac100 = (struct ftmac100 *)(uintptr_t)priv->iobase; struct ftmac100_txdes *curr_des = priv->txdes; ulong start; |
