Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753985AbYHYBn0 (ORCPT ); Sun, 24 Aug 2008 21:43:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752878AbYHYBnR (ORCPT ); Sun, 24 Aug 2008 21:43:17 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:39794 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752727AbYHYBnQ (ORCPT ); Sun, 24 Aug 2008 21:43:16 -0400 Date: Mon, 25 Aug 2008 02:43:11 +0100 From: Al Viro To: Roland Dreier Cc: David Vrabel , Kernel development list , linux-usb , torvalds@linux-foundation.org Subject: Re: [patch] Add helper macros for little-endian bitfields Message-ID: <20080825014311.GS28946@ZenIV.linux.org.uk> References: <48AD6AF0.3050504@csr.com> <48AD6B93.7020702@csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 756 Lines: 16 On Sun, Aug 24, 2008 at 06:37:43PM -0700, Roland Dreier wrote: > > + * NOTE: When using multibyte bitfields, you need to convert the data > > + * from Little Endian to CPU before you can access the bitfield > > + * (to make it simpler): NOTE: When tempted to use multibyte bitfields on fixed-layout data, you need to look in the mirror, ask yourself "what will they do to me during code review for that?", shudder and decide that some temptations are just not worth the pain. IOW, don't do it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/