Replace hard-coded poll interval and timeout values in at803x_cdt_wait_for_completion() with named macros. This improves readability and documents the timing assumptions used by the cable diagnostic test without changing behavior. Signed-off-by: Vinitha Vijayan --- drivers/net/phy/qcom/qcom-phy-lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/qcom/qcom-phy-lib.c b/drivers/net/phy/qcom/qcom-phy-lib.c index 965c2bb99a9b..cc4c6b254c62 100644 --- a/drivers/net/phy/qcom/qcom-phy-lib.c +++ b/drivers/net/phy/qcom/qcom-phy-lib.c @@ -9,6 +9,9 @@ #include "qcom.h" +#define AT803X_CDT_POLL_INTERVAL_US 30000 +#define AT803X_CDT_TIMEOUT_US 100000 + MODULE_DESCRIPTION("Qualcomm PHY driver Common Functions"); MODULE_AUTHOR("Matus Ujhelyi"); MODULE_AUTHOR("Christian Marangi "); @@ -484,7 +487,9 @@ int at803x_cdt_wait_for_completion(struct phy_device *phydev, /* One test run takes about 25ms */ ret = phy_read_poll_timeout(phydev, AT803X_CDT, val, !(val & cdt_en), - 30000, 100000, true); + AT803X_CDT_POLL_INTERVAL_US, + AT803X_CDT_TIMEOUT_US, + true); return ret < 0 ? ret : 0; } -- 2.50.1