From: Mark Williamson Subject: Re: netfront: rx->offset: 12, size: 4294967295 Date: Tue, 5 Jun 2007 22:57:07 +0100 Message-ID: <200706052257.08483.mark.williamson@cl.cam.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser , Herbert Xu , jajcus@jajcus.net List-Id: xen-devel@lists.xenproject.org > > My suspicion is that, strictly speaking, the assignment of 1 to > > copying_receiver is invalid because a single-bit bitfield can only hold > > the values -1 and 0. Older gcc perhaps mapped 1 to -1, but 4.2.0 is > > mapping 1 to 0 (or choosing to do that as an optimisation, since it has > > the choice, and hence can simplify the code to always write zero in this > > case). That sucks. > > That's why we always use unsigned for bitfields in Linux. I found a load of bitfields that we ought to consider unsigned-ifying when I ran sparse over the tree. I guess I should try and get a patch sent out proactively, maybe that'll head off similar problems in future. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel!