net: hns3: limit some variable scope in critical data path
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 23 Feb 2019 09:22:10 +0000 (17:22 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 04:27:50 +0000 (20:27 -0800)
commit47e7b13b0aff869465585d36a8d5075fe17cb90a
tree5d084faddd5b53e1adb802813bb621a3531dc638
parent3fe13ed95dd3c4aede3313a2dd2d589c207b51d0
net: hns3: limit some variable scope in critical data path

This patch limits some variables' scope as much as possible in
hns3_fill_desc.

Also, only set l3_type and l4_type when necessary.

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