OSDN Git Service

net: hns3: refactor function hns3_fill_skb_desc to simplify code
authorPeng Li <lipeng321@huawei.com>
Thu, 2 Dec 2021 08:35:56 +0000 (16:35 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Dec 2021 11:53:42 +0000 (11:53 +0000)
commita1cfb24d011a39ab65bb154dd85d9f879c6e5e4d
treee2f80ca140e81327cea18d7501055a55d79952e0
parente6d72f6ac2ad4965491354d74b48e35a60abf298
net: hns3: refactor function hns3_fill_skb_desc to simplify code

The function hns3_fill_skb_desc is hard to read, this patch
extract 2 functions and add new a struct data to simplify the
code and Improve readability.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c