net: hns3: refactor hns3_set_ringparam()
authorHao Chen <chenhao288@hisilicon.com>
Tue, 19 Apr 2022 03:27:02 +0000 (11:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2022 09:45:50 +0000 (10:45 +0100)
commit07fdc163ac886613e406e8c4356279d9a824b529
tree61fa784543db91fbbaa3c785c5726e432061fadf
parent286c61e7279768cec9c13bf8ce947de5c33e2325
net: hns3: refactor hns3_set_ringparam()

Use struct hns3_ring_param to replace variable new/old_xxx and
add hns3_is_ringparam_changed() to judge them if is changed to
improve code readability.

Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.h