public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Roland Dreier <rdreier@cisco.com>
Cc: David Vrabel <david.vrabel@csr.com>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	linux-usb <linux-usb@vger.kernel.org>,
	torvalds@linux-foundation.org
Subject: Re: [patch] Add helper macros for little-endian bitfields
Date: Mon, 25 Aug 2008 02:43:11 +0100	[thread overview]
Message-ID: <20080825014311.GS28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <adaprnxnac8.fsf@cisco.com>

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.

  reply	other threads:[~2008-08-25  1:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 13:17 New subsystems: Ultra-Wideband radio, Wireless USB and WiMedia LLC Protocol David Vrabel
2008-08-21 13:19 ` [patch] bitmap: add bitmap_copy_le() David Vrabel
2008-08-21 13:20 ` [patch] Add helper macros for little-endian bitfields David Vrabel
2008-08-25  1:37   ` Roland Dreier
2008-08-25  1:43     ` Al Viro [this message]
2008-08-27 15:20       ` David Vrabel
2008-08-27 21:19         ` Jeremy Fitzhardinge
2008-08-27 21:26         ` Linus Torvalds
2008-08-21 14:21 ` New subsystems: Ultra-Wideband radio, Wireless USB and WiMedia LLC Protocol Sam Ravnborg
2008-08-21 19:01   ` Sam Ravnborg
2008-08-21 15:43 ` Greg KH
2008-09-17 16:20 ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080825014311.GS28946@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=david.vrabel@csr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox