Commit 145d6e29 authored by Fugang Duan's avatar Fugang Duan Committed by David S. Miller

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: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 61e04ccb
...@@ -235,14 +235,14 @@ static struct bufdesc *fec_enet_get_nextdesc(struct bufdesc *bdp, ...@@ -235,14 +235,14 @@ static struct bufdesc *fec_enet_get_nextdesc(struct bufdesc *bdp,
struct bufdesc_prop *bd) struct bufdesc_prop *bd)
{ {
return (bdp >= bd->last) ? bd->base 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, static struct bufdesc *fec_enet_get_prevdesc(struct bufdesc *bdp,
struct bufdesc_prop *bd) struct bufdesc_prop *bd)
{ {
return (bdp <= bd->base) ? bd->last 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, static int fec_enet_get_bd_index(struct bufdesc *bdp,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment