diff options
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 643b5d665f41..1d788f19135b 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -186,9 +186,9 @@ static const struct phy_setting settings[] = { | |||
186 | * of that setting. Returns the index of the last setting if | 186 | * of that setting. Returns the index of the last setting if |
187 | * none of the others match. | 187 | * none of the others match. |
188 | */ | 188 | */ |
189 | static inline int phy_find_setting(int speed, int duplex) | 189 | static inline unsigned int phy_find_setting(int speed, int duplex) |
190 | { | 190 | { |
191 | int idx = 0; | 191 | unsigned int idx = 0; |
192 | 192 | ||
193 | while (idx < ARRAY_SIZE(settings) && | 193 | while (idx < ARRAY_SIZE(settings) && |
194 | (settings[idx].speed != speed || settings[idx].duplex != duplex)) | 194 | (settings[idx].speed != speed || settings[idx].duplex != duplex)) |
@@ -207,7 +207,7 @@ static inline int phy_find_setting(int speed, int duplex) | |||
207 | * the mask in features. Returns the index of the last setting | 207 | * the mask in features. Returns the index of the last setting |
208 | * if nothing else matches. | 208 | * if nothing else matches. |
209 | */ | 209 | */ |
210 | static inline int phy_find_valid(int idx, u32 features) | 210 | static inline unsigned int phy_find_valid(unsigned int idx, u32 features) |
211 | { | 211 | { |
212 | while (idx < MAX_NUM_SETTINGS && !(settings[idx].setting & features)) | 212 | while (idx < MAX_NUM_SETTINGS && !(settings[idx].setting & features)) |
213 | idx++; | 213 | idx++; |
@@ -226,7 +226,7 @@ static inline int phy_find_valid(int idx, u32 features) | |||
226 | static void phy_sanitize_settings(struct phy_device *phydev) | 226 | static void phy_sanitize_settings(struct phy_device *phydev) |
227 | { | 227 | { |
228 | u32 features = phydev->supported; | 228 | u32 features = phydev->supported; |
229 | int idx; | 229 | unsigned int idx; |
230 | 230 | ||
231 | /* Sanitize settings based on PHY capabilities */ | 231 | /* Sanitize settings based on PHY capabilities */ |
232 | if ((features & SUPPORTED_Autoneg) == 0) | 232 | if ((features & SUPPORTED_Autoneg) == 0) |
@@ -979,7 +979,8 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) | |||
979 | (phydev->interface == PHY_INTERFACE_MODE_RGMII))) { | 979 | (phydev->interface == PHY_INTERFACE_MODE_RGMII))) { |
980 | int eee_lp, eee_cap, eee_adv; | 980 | int eee_lp, eee_cap, eee_adv; |
981 | u32 lp, cap, adv; | 981 | u32 lp, cap, adv; |
982 | int idx, status; | 982 | int status; |
983 | unsigned int idx; | ||
983 | 984 | ||
984 | /* Read phy status to properly get the right settings */ | 985 | /* Read phy status to properly get the right settings */ |
985 | status = phy_read_status(phydev); | 986 | status = phy_read_status(phydev); |