Skip to content

Commit c04d102

Browse files
Russell Kingdavem330
authored andcommitted
doc: sfp-phylink: correct code indentation
Using vim to edit the phylink documentation reveals some mistakes due to the "invisible" pythonesque white space indentation that can't be seen with other editors. Fix it. Signed-off-by: Russell King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 630fe59 commit c04d102

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Documentation/networking/sfp-phylink.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,27 +138,27 @@ this documentation.
138138

139139
.. code-block:: c
140140
141-
static int foo_ethtool_set_link_ksettings(struct net_device *dev,
142-
const struct ethtool_link_ksettings *cmd)
143-
{
144-
struct foo_priv *priv = netdev_priv(dev);
145-
146-
return phylink_ethtool_ksettings_set(priv->phylink, cmd);
147-
}
148-
149-
static int foo_ethtool_get_link_ksettings(struct net_device *dev,
150-
struct ethtool_link_ksettings *cmd)
151-
{
152-
struct foo_priv *priv = netdev_priv(dev);
141+
static int foo_ethtool_set_link_ksettings(struct net_device *dev,
142+
const struct ethtool_link_ksettings *cmd)
143+
{
144+
struct foo_priv *priv = netdev_priv(dev);
145+
146+
return phylink_ethtool_ksettings_set(priv->phylink, cmd);
147+
}
153148

154-
return phylink_ethtool_ksettings_get(priv->phylink, cmd);
155-
}
149+
static int foo_ethtool_get_link_ksettings(struct net_device *dev,
150+
struct ethtool_link_ksettings *cmd)
151+
{
152+
struct foo_priv *priv = netdev_priv(dev);
153+
154+
return phylink_ethtool_ksettings_get(priv->phylink, cmd);
155+
}
156156

157-
7. Replace the call to:
157+
7. Replace the call to::
158158

159159
phy_dev = of_phy_connect(dev, node, link_func, flags, phy_interface);
160160

161-
and associated code with a call to:
161+
and associated code with a call to::
162162

163163
err = phylink_of_phy_connect(priv->phylink, node, flags);
164164

0 commit comments

Comments
 (0)