From: shenhao shenhao21@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
---------------------------------------------------
This patch deletes the variable phy_dev in hclge_get_sset_count() function as it is called at only one place and can be replaced with hdev->hw.mac.phydev.
Signed-off-by: Guangbin Huang huangguangbin2@huawei.com Signed-off-by: shenhao shenhao21@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 324925a..a3b1765 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -728,7 +728,6 @@ static int hclge_get_sset_count(struct hnae3_handle *handle, int stringset) HNAE3_SUPPORT_SERDES_PARALLEL_LOOPBACK)
struct hclge_vport *vport = hclge_get_vport(handle); - struct phy_device *phy_dev = handle->netdev->phydev; struct hclge_dev *hdev = vport->back; int count = 0;
@@ -752,7 +751,7 @@ static int hclge_get_sset_count(struct hnae3_handle *handle, int stringset) handle->flags |= HNAE3_SUPPORT_SERDES_SERIAL_LOOPBACK; handle->flags |= HNAE3_SUPPORT_SERDES_PARALLEL_LOOPBACK;
- if (phy_dev) { + if (hdev->hw.mac.phydev) { count += 1; handle->flags |= HNAE3_SUPPORT_PHY_LOOPBACK; }