summaryrefslogtreecommitdiff
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2018-02-23 18:25:46 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-01 21:26:14 +0300
commite31a6f9067e3c30da1bea26ce2d1355af9577d13 (patch)
tree291648bfcd28dc881c4ccc3dd0fbe10dad631a7d /include/net/sch_generic.h
parentba6078081caae5bebbd34844ee2cf6c52aa7daec (diff)
downloadlinux-e31a6f9067e3c30da1bea26ce2d1355af9577d13.tar.xz
net: phylink: Remove redundant netdev.phydev assignment
As a part of working on MII time stamping infrastructure, I was trying to figure out how netdev->phydev gets assigned, and I stumbled across this. Ever since the new phylink code came in, the field is assigned twice. The function, phylink_connect_phy(), calls phy_attach_direct() phylink_bringup_phy() and phy_attach_direct() sets dev->phydev = phydev; but phylink_bringup_phy() then sets the same field again: pl->netdev->phydev = phy; Similarly, the function, phylink_of_phy_connect(), calls of_phy_attach() phy_attach_direct() phylink_bringup_phy() The removal code is also duplicated: phylink_disconnect_phy() pl->netdev->phydev = NULL; phy_disconnect() phy_detach() phydev->attached_dev->phydev = NULL; This patch removes the redundant assignments, restricting manipulation of the netdev.phydev field to phy_attach_direct() and phy_detach(). Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
0 files changed, 0 insertions, 0 deletions