summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2017-04-11 19:13:04 +0800
committerDavid S. Miller <davem@davemloft.net>2017-04-11 14:36:27 -0400
commit145d6e295f12681ed564d32fff3dabf9292f6871 (patch)
tree9e710b4334d59f0f2f8c1f3e1f77d8cd41175b20 /drivers/net/ethernet/freescale
parent61e04ccbcbc4b1ba974af371e6f63906fb1d78fb (diff)
downloadop-kernel-dev-145d6e295f12681ed564d32fff3dabf9292f6871.zip
op-kernel-dev-145d6e295f12681ed564d32fff3dabf9292f6871.tar.gz
net: fec: avoid BD pointer type cast to 32bit
In aarch64 system, the BD pointer is 64bit, and the high-order 32-bits of the address is effective, so replace usigned with (void *) type to aovid 64bit address is casted to 32bit in .fec_enet_get_nextdesc() and .fec_enet_get_prevdesc() functions. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 886a9c9..172624c 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -235,14 +235,14 @@ static struct bufdesc *fec_enet_get_nextdesc(struct bufdesc *bdp,
struct bufdesc_prop *bd)
{
return (bdp >= bd->last) ? bd->base
- : (struct bufdesc *)(((unsigned)bdp) + bd->dsize);
+ : (struct bufdesc *)(((void *)bdp) + bd->dsize);
}
static struct bufdesc *fec_enet_get_prevdesc(struct bufdesc *bdp,
struct bufdesc_prop *bd)
{
return (bdp <= bd->base) ? bd->last
- : (struct bufdesc *)(((unsigned)bdp) - bd->dsize);
+ : (struct bufdesc *)(((void *)bdp) - bd->dsize);
}
static int fec_enet_get_bd_index(struct bufdesc *bdp,
OpenPOWER on IntegriCloud