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:
parent
61e04ccbcb
commit
145d6e295f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user