Cleanup of net/if_media.c: some style.
Reviewed by: hselasky Sponsored by: Mellanox Technologies/NVidia Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27034
This commit is contained in:
parent
2193fb16b5
commit
899322fdfa
@ -213,7 +213,7 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
|
||||
int error = 0;
|
||||
|
||||
if (ifp == NULL || ifr == NULL || ifm == NULL)
|
||||
return(EINVAL);
|
||||
return (EINVAL);
|
||||
|
||||
switch (cmd) {
|
||||
/*
|
||||
@ -243,10 +243,9 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm,
|
||||
* Keep going in case the connected media changed.
|
||||
* Similarly, if best match changed (kernel debugger?).
|
||||
*/
|
||||
if ((IFM_SUBTYPE(newmedia) != IFM_AUTO) &&
|
||||
(newmedia == ifm->ifm_media) &&
|
||||
(match == ifm->ifm_cur))
|
||||
return 0;
|
||||
if (IFM_SUBTYPE(newmedia) != IFM_AUTO &&
|
||||
newmedia == ifm->ifm_media && match == ifm->ifm_cur)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* We found a match, now make the driver switch to it.
|
||||
@ -346,7 +345,7 @@ ifmedia_match(struct ifmedia *ifm, int target, int mask)
|
||||
}
|
||||
}
|
||||
|
||||
return match;
|
||||
return (match);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -362,7 +361,8 @@ ifmedia_baudrate(int mword)
|
||||
int i;
|
||||
|
||||
for (i = 0; ifmedia_baudrate_descriptions[i].ifmb_word != 0; i++) {
|
||||
if (IFM_TYPE_MATCH(mword, ifmedia_baudrate_descriptions[i].ifmb_word))
|
||||
if (IFM_TYPE_MATCH(mword, ifmedia_baudrate_descriptions[i].
|
||||
ifmb_word))
|
||||
return (ifmedia_baudrate_descriptions[i].ifmb_baudrate);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user