From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlJRQ-0002QX-2g for qemu-devel@nongnu.org; Thu, 02 Oct 2008 04:21:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlJRO-0002QL-CY for qemu-devel@nongnu.org; Thu, 02 Oct 2008 04:21:43 -0400 Received: from [199.232.76.173] (port=36564 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlJRO-0002QI-5e for qemu-devel@nongnu.org; Thu, 02 Oct 2008 04:21:42 -0400 Received: from verein.lst.de ([213.95.11.210]:41314) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KlJRN-0002yK-Nj for qemu-devel@nongnu.org; Thu, 02 Oct 2008 04:21:42 -0400 Date: Thu, 2 Oct 2008 10:21:37 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 1/4] add byteordered types to qemu. Message-ID: <20081002082137.GA25959@lst.de> References: <1222870375-13489-1-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1222870375-13489-1-git-send-email-kraxel@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann On Wed, Oct 01, 2008 at 04:12:52PM +0200, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > --- > bswap.h | 7 +++++++ > hw/usb-net.c | 2 -- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/bswap.h b/bswap.h > index 523d805..b294d96 100644 > --- a/bswap.h > +++ b/bswap.h > @@ -206,4 +206,11 @@ static inline void cpu_to_be32wu(uint32_t *p, uint32_t v) > #undef le_bswaps > #undef be_bswaps > > +typedef uint16_t le16; > +typedef uint32_t le32; > +typedef uint64_t le64; > +typedef uint16_t be16; > +typedef uint32_t be32; > +typedef uint64_t be64; Any chance you could add sparse __bitwise__ declarations so one could use spare to check for using these types correctly?