|
|
Subscribe / Log in / New account

Re: [patch] Add helper macros for little-endian bitfields

From:  Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn-AT-public.gmane.org>
To:  Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w-AT-public.gmane.org>
Subject:  Re: [patch] Add helper macros for little-endian bitfields
Date:  Mon, 25 Aug 2008 02:43:11 +0100
Message-ID:  <20080825014311.GS28946@ZenIV.linux.org.uk>
Cc:  David Vrabel <david.vrabel-kQvG35nSl+M-AT-public.gmane.org>, Kernel development list <linux-kernel-u79uwXL29TY76Z2rM5mHXA-AT-public.gmane.org>, linux-usb <linux-usb-u79uwXL29TY76Z2rM5mHXA-AT-public.gmane.org>, torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b-AT-public.gmane.org
Archive‑link:  Article

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-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




to post comments

Re: [patch] Add helper macros for little-endian bitfields

Posted Aug 28, 2008 18:48 UTC (Thu) by vmole (guest, #111) [Link]

Yet another example of why the key check phrase for would-be kernel developers is WWAD: "What Would Al Do?".


Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds