Date: Tue, 18 Aug 2020 12:14:01 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364344 - head/sys/dev/iicbus/mux Message-ID: <202008181214.07ICE1Am023897@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008181214.07ICE1Am023897>