]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: minor optimization for ring_space
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 4 Apr 2019 08:17:52 +0000 (16:17 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Apr 2019 17:20:38 +0000 (10:20 -0700)
commitc1c5111b402b8c06abe64239973324e7050e2eeb
tree946e230d1941e1b8b12879e32716529d8c46053b
parent51f76ab09241bc578a6d2f0355a9e45e2b90324e
net: hns3: minor optimization for ring_space

This patch optimizes the ring_space by calculating the
ring space without calling ring_dist.

Also ring_dist is only used by ring_space, so this patch
removes it when it is no longer used.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@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.h