aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-03-14 22:31:55 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-14 22:31:55 -0400
commit85dcce7a73f1cc59f7a96fe52713b1630f4ca272 (patch)
tree6c645923eb2f0152073b90685ce80e46cfb7afed /drivers/net/phy
parent4c4e4113db249c828fffb286bc95ffb255e081f5 (diff)
parenta4ecdf82f8ea49f7d3a072121dcbd0bf3a7cb93a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/usb/r8152.c drivers/net/xen-netback/netback.c Both the r8152 and netback conflicts were simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy.c11
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 */
189static inline int phy_find_setting(int speed, int duplex) 189static 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 */
210static inline int phy_find_valid(int idx, u32 features) 210static 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)
226static void phy_sanitize_settings(struct phy_device *phydev) 226static 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);