Author: mmel
Date: Sun Jan 27 15:50:36 2019
New Revision: 343498
URL: https://svnweb.freebsd.org/changeset/base/343498

Log:
  Properly define and declare phynode_topo_lock,
  it should be single global variable.
  
  X-MFC with:   r340845
  Noticed by:   phynode_topo_lock

Modified:
  head/sys/dev/extres/phy/phy.c
  head/sys/dev/extres/phy/phy_internal.h

Modified: head/sys/dev/extres/phy/phy.c
==============================================================================
--- head/sys/dev/extres/phy/phy.c       Sun Jan 27 15:29:58 2019        
(r343497)
+++ head/sys/dev/extres/phy/phy.c       Sun Jan 27 15:50:36 2019        
(r343498)
@@ -68,7 +68,7 @@ static phynode_method_t phynode_methods[] = {
 DEFINE_CLASS_0(phynode, phynode_class, phynode_methods, 0);
 
 static phynode_list_t phynode_list = TAILQ_HEAD_INITIALIZER(phynode_list);
-
+struct sx phynode_topo_lock;
 SX_SYSINIT(phy_topology, &phynode_topo_lock, "Phy topology lock");
 
 /* ----------------------------------------------------------------------------

Modified: head/sys/dev/extres/phy/phy_internal.h
==============================================================================
--- head/sys/dev/extres/phy/phy_internal.h      Sun Jan 27 15:29:58 2019        
(r343497)
+++ head/sys/dev/extres/phy/phy_internal.h      Sun Jan 27 15:50:36 2019        
(r343498)
@@ -78,6 +78,6 @@ struct phy {
 #define PHYNODE_XLOCK(_sc)     sx_xlock(&((_sc)->lock))
 #define PHYNODE_UNLOCK(_sc)    sx_unlock(&((_sc)->lock))
 
-struct sx              phynode_topo_lock;
+extern struct sx phynode_topo_lock;
 
 #endif /* DEV_EXTRES_PHY_INTERNAL_H */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to