]> git.baikalelectronics.ru Git - kernel.git/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)
commitea08667f30d44715fb003f017656352a63817a2f
tree971f6b5f317fce0ccd8679434718e3e6c1d7e22e
parenta2eeec9c68e6e5167c28dffd88ef6b97ab857210
net: hns3: minor cleanup for hns3_handle_rx_bd()

Since commit a42418f9a0a1 ("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