On Fri, 3 Dec 2010, Bruce Cran wrote:
Log: Revert r216134. This checkin broke platforms where bus_space are macros: they need to be a single statement, and do { } while (0) doesn't work in this situation so revert until a solution can be devised.
Surprising that do-while doesn't work.
... Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Fri Dec 3 07:01:07 2010 (r216142) +++ head/sys/arm/include/bus.h Fri Dec 3 07:09:23 2010 (r216143) ... @@ -321,29 +318,21 @@ struct bus_space { * Bus read multiple operations. */ #define bus_space_read_multi_1(t, h, o, a, c) \ - KASSERT(c != 0, ("bus_space_read_multi_1: count == 0")); \ __bs_nonsingle(rm,1,(t),(h),(o),(a),(c))
I just noticed the following possibly more serious problems for the macro versions: - the `c' arg is missing parentheses in the KASSERT() - the `c' arg is now evaluated twice. This turns safe macros into unsafe ones. Bruce _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"