Commit 75c583ab authored by Ioana Radulescu's avatar Ioana Radulescu Committed by Greg Kroah-Hartman

staging: fsl-dpaa2/eth: Fix incorrect casts

The DPAA2 Ethernet driver incorrectly assumes virtual addresses
are always 64b long, which causes compiler errors when building
for a 32b platform.

Fix this by using explicit casts to uintptr_t where necessary.
Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 43c3c14d
...@@ -324,7 +324,7 @@ static int consume_frames(struct dpaa2_eth_channel *ch) ...@@ -324,7 +324,7 @@ static int consume_frames(struct dpaa2_eth_channel *ch)
} }
fd = dpaa2_dq_fd(dq); fd = dpaa2_dq_fd(dq);
fq = (struct dpaa2_eth_fq *)dpaa2_dq_fqd_ctx(dq); fq = (struct dpaa2_eth_fq *)(uintptr_t)dpaa2_dq_fqd_ctx(dq);
fq->stats.frames++; fq->stats.frames++;
fq->consume(priv, ch, fd, &ch->napi, fq->flowid); fq->consume(priv, ch, fd, &ch->napi, fq->flowid);
...@@ -1905,7 +1905,7 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv, ...@@ -1905,7 +1905,7 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv,
queue.destination.id = fq->channel->dpcon_id; queue.destination.id = fq->channel->dpcon_id;
queue.destination.type = DPNI_DEST_DPCON; queue.destination.type = DPNI_DEST_DPCON;
queue.destination.priority = 1; queue.destination.priority = 1;
queue.user_context = (u64)fq; queue.user_context = (u64)(uintptr_t)fq;
err = dpni_set_queue(priv->mc_io, 0, priv->mc_token, err = dpni_set_queue(priv->mc_io, 0, priv->mc_token,
DPNI_QUEUE_RX, 0, fq->flowid, DPNI_QUEUE_RX, 0, fq->flowid,
DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST, DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST,
...@@ -1957,7 +1957,7 @@ static int setup_tx_flow(struct dpaa2_eth_priv *priv, ...@@ -1957,7 +1957,7 @@ static int setup_tx_flow(struct dpaa2_eth_priv *priv,
queue.destination.id = fq->channel->dpcon_id; queue.destination.id = fq->channel->dpcon_id;
queue.destination.type = DPNI_DEST_DPCON; queue.destination.type = DPNI_DEST_DPCON;
queue.destination.priority = 0; queue.destination.priority = 0;
queue.user_context = (u64)fq; queue.user_context = (u64)(uintptr_t)fq;
err = dpni_set_queue(priv->mc_io, 0, priv->mc_token, err = dpni_set_queue(priv->mc_io, 0, priv->mc_token,
DPNI_QUEUE_TX_CONFIRM, 0, fq->flowid, DPNI_QUEUE_TX_CONFIRM, 0, fq->flowid,
DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST, DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST,
......
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