]> git.itanic.dy.fi Git - linux-stable/commit
net: hns3: minor cleanup for hns3_handle_rx_bd()
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 19 Oct 2019 08:03:54 +0000 (16:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2019 16:22:10 +0000 (09:22 -0700)
commitd35bced88f7043bee42df795cb7a0d5a8e99248c
tree971f6b5f317fce0ccd8679434718e3e6c1d7e22e
parent76643555a145b06ec6dcc0d1cc0691575dceffc9
net: hns3: minor cleanup for hns3_handle_rx_bd()

Since commit e55970950556 ("net: hns3: Add handling of GRO Pkts
not fully RX'ed in NAPI poll"), ring->skb is used to record the
current SKB when processing the RX BD in hns3_handle_rx_bd(),
so the parameter out_skb is unnecessary.

This patch also adjusts the err checking to reduce duplication
in hns3_handle_rx_bd(), and "err == -ENXIO" is rare case, so put
it in the unlikely annotation.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c