From owner-svn-src-head@FreeBSD.ORG Fri Dec 3 18:02:06 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0591A106566B; Fri, 3 Dec 2010 18:02:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 785578FC1C; Fri, 3 Dec 2010 18:02:05 +0000 (UTC) Received: from c211-30-187-94.carlnfd1.nsw.optusnet.com.au (c211-30-187-94.carlnfd1.nsw.optusnet.com.au [211.30.187.94]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oB3I1tYL031546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Dec 2010 05:02:03 +1100 Date: Sat, 4 Dec 2010 05:01:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Cran In-Reply-To: <201012030709.oB379NOH058721@svn.freebsd.org> Message-ID: <20101204045754.T4046@besplex.bde.org> References: <201012030709.oB379NOH058721@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r216143 - in head: share/man/man9 sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/pc98/include sys/powerpc/include sys/sparc64/include sys/sun4v... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2010 18:02:06 -0000 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