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>
This commit is contained in:
Fugang Duan 2017-04-11 19:13:04 +08:00 committed by David S. Miller
parent 61e04ccbcb
commit 145d6e295f

View File

@ -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,