Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
net: hisilicon: Cleanup for cast to restricted __be32
Browse files Browse the repository at this point in the history
This patch fixes the following warning from sparse:
hip04_eth.c:533:23: warning: cast to restricted __be16
hip04_eth.c:533:23: warning: cast to restricted __be16
hip04_eth.c:533:23: warning: cast to restricted __be16
hip04_eth.c:533:23: warning: cast to restricted __be16
hip04_eth.c:534:23: warning: cast to restricted __be32
hip04_eth.c:534:23: warning: cast to restricted __be32
hip04_eth.c:534:23: warning: cast to restricted __be32
hip04_eth.c:534:23: warning: cast to restricted __be32
hip04_eth.c:534:23: warning: cast to restricted __be32
hip04_eth.c:534:23: warning: cast to restricted __be32

Signed-off-by: Jiangfeng Xiao <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
xiaojiangfeng authored and davem330 committed Jul 9, 2019
1 parent 148233e commit a8edf52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/hisilicon/hip04_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ static int hip04_rx_poll(struct napi_struct *napi, int budget)
priv->rx_phys[priv->rx_head] = 0;

desc = (struct rx_desc *)skb->data;
len = be16_to_cpu(desc->pkt_len);
err = be32_to_cpu(desc->pkt_err);
len = be16_to_cpu((__force __be16)desc->pkt_len);
err = be32_to_cpu((__force __be32)desc->pkt_err);

if (0 == len) {
dev_kfree_skb_any(skb);
Expand Down

0 comments on commit a8edf52

Please sign in to comment.