diff mbox series

[net] net: phylink: update documentation on create and destroy

Message ID E1iX79Q-0000hw-0u@rmk-PC.armlinux.org.uk
State Accepted
Delegated to: David Miller
Headers show
Series [net] net: phylink: update documentation on create and destroy | expand

Commit Message

Russell King (Oracle) Nov. 19, 2019, 5:18 p.m. UTC
Update the documentation on phylink's create and destroy functions to
explicitly state that the rtnl lock must not be held while calling
these.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/phylink.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

David Miller Nov. 20, 2019, 2:56 a.m. UTC | #1
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 19 Nov 2019 17:18:52 +0000

> Update the documentation on phylink's create and destroy functions to
> explicitly state that the rtnl lock must not be held while calling
> these.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 8b5e1086523c..342521ed7e7a 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -580,6 +580,8 @@  static int phylink_register_sfp(struct phylink *pl,
  * Create a new phylink instance, and parse the link parameters found in @np.
  * This will parse in-band modes, fixed-link or SFP configuration.
  *
+ * Note: the rtnl lock must not be held when calling this function.
+ *
  * Returns a pointer to a &struct phylink, or an error-pointer value. Users
  * must use IS_ERR() to check for errors from this function.
  */
@@ -659,6 +661,8 @@  EXPORT_SYMBOL_GPL(phylink_create);
  *
  * Destroy a phylink instance. Any PHY that has been attached must have been
  * cleaned up via phylink_disconnect_phy() prior to calling this function.
+ *
+ * Note: the rtnl lock must not be held when calling this function.
  */
 void phylink_destroy(struct phylink *pl)
 {