From: Guangbin Huang huangguangbin2@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
This patch deletes the parameter phydev of hclge_phy_link_status_wait() function for optimization, as it can be gotten by hdev->hw.mac.phydev.
Signed-off-by: Guangbin Huang huangguangbin2@huawei.com Reviewed-by: Peng Li lipeng321@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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 8401f51..a92de09 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -6525,10 +6525,11 @@ static int hclge_config_switch_param(struct hclge_dev *hdev, int vfid, u8 value, }
static void hclge_phy_link_status_wait(struct hclge_dev *hdev, - struct phy_device *phydev, int link_ret) + int link_ret) { #define HCLGE_PHY_LINK_STATUS_NUM 200
+ struct phy_device *phydev = hdev->hw.mac.phydev; int i = 0; int ret;
@@ -6571,13 +6572,12 @@ static int hclge_mac_phy_link_status_wait(struct hclge_dev *hdev, bool en, #define HCLGE_LINK_STATUS_DOWN 0 #define HCLGE_LINK_STATUS_UP 1
- struct phy_device *phydev = hdev->hw.mac.phydev; int link_ret;
link_ret = en ? HCLGE_LINK_STATUS_UP : HCLGE_LINK_STATUS_DOWN;
if (is_phy) - hclge_phy_link_status_wait(hdev, phydev, link_ret); + hclge_phy_link_status_wait(hdev, link_ret);
return hclge_mac_link_status_wait(hdev, link_ret); }