aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2018-06-22 05:50:52 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-22 21:42:02 -0400
commitc2cd650b5b2bd6b57f2f62be65b1a8a576d4de6d (patch)
tree29ef03e178fed8cf07eb78f99ba0cec0b9d09841
parent271f7ff5aa5a73488b7a9d8b84b5205fb5b2f7cc (diff)
net: mscc: make sparse happy
This patch fixes a sparse warning about using an incorrect type in argument 2 of ocelot_write_rix(), as an u32 was expected but a __be32 was given. The conversion to u32 is forced, which is safe as the value will be written as-is in the hardware without any modification. Fixes: 08d02364b12f ("net: mscc: fix the injection header") Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mscc/ocelot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 52c57e0ff617..776a8a9be8e3 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -374,7 +374,8 @@ static int ocelot_port_xmit(struct sk_buff *skb, struct net_device *dev)
374 ocelot_gen_ifh(ifh, &info); 374 ocelot_gen_ifh(ifh, &info);
375 375
376 for (i = 0; i < IFH_LEN; i++) 376 for (i = 0; i < IFH_LEN; i++)
377 ocelot_write_rix(ocelot, cpu_to_be32(ifh[i]), QS_INJ_WR, grp); 377 ocelot_write_rix(ocelot, (__force u32)cpu_to_be32(ifh[i]),
378 QS_INJ_WR, grp);
378 379
379 count = (skb->len + 3) / 4; 380 count = (skb->len + 3) / 4;
380 last = skb->len % 4; 381 last = skb->len % 4;