]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: code optimization for hclge_rx_buffer_calc
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 2 Feb 2019 14:39:29 +0000 (22:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Feb 2019 16:24:08 +0000 (08:24 -0800)
commit85dab1f25578b39e56fb79dc51f128bcba795ede
tree2c44febe56a1f593525d201632d42e5ec90f5b04
parente1425540c80b3ed28a5312f3d71f9a46018fc90d
net: hns3: code optimization for hclge_rx_buffer_calc

There are four steps to calcuate the rx private buffer, each step
can be done in a function to avoid code duplication and aid code
readability.

This patch adds three separate functions do the job. Also, the
function name more or less make the comment redundant, so remove
some obvious comment.

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/hns3pf/hclge_main.c