svn commit: r364344 - head/sys/dev/iicbus/mux

Andriy Gapon avg at FreeBSD.org
Tue Aug 18 12:14:01 UTC 2020


Author: avg
Date: Tue Aug 18 12:14:01 2020
New Revision: 364344
URL: https://svnweb.freebsd.org/changeset/base/364344

Log:
  iicmux: fix a sign error in comparison
  
  Because pcell_t is unsigned both sides of the comparison were treated as
  such.
  Because of that error iicmux created all possible sub-buses even if only
  a subset was defined in the device tree.
  
  MFC after:	1 week

Modified:
  head/sys/dev/iicbus/mux/iicmux.c

Modified: head/sys/dev/iicbus/mux/iicmux.c
==============================================================================
--- head/sys/dev/iicbus/mux/iicmux.c	Tue Aug 18 11:36:38 2020	(r364343)
+++ head/sys/dev/iicbus/mux/iicmux.c	Tue Aug 18 12:14:01 2020	(r364344)
@@ -283,7 +283,7 @@ iicmux_attach_children(struct iicmux_softc *sc)
 		}
 		sc->childdevs[idx] = device_add_child(sc->dev, "iicbus", -1);
 		sc->childnodes[idx] = child;
-		if (sc->maxbus < idx)
+		if (sc->maxbus < (int)idx)
 			sc->maxbus = idx;
 	}
 


More information about the svn-src-head mailing list