From: Harvey Harrison <harvey.harrison@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
David Miller <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] byteorder: force in-place endian conversion to always evaluate args
Date: Sat, 26 Jul 2008 10:46:37 -0700 [thread overview]
Message-ID: <1217094397.5971.67.camel@brick> (raw)
In-Reply-To: <20080726053459.GA26063@infradead.org>
On Sat, 2008-07-26 at 01:34 -0400, Christoph Hellwig wrote:
> On Fri, Jul 25, 2008 at 09:33:41AM -0700, Harvey Harrison wrote:
> > David Miller reported breakage in ide when the in-place byteorder helpers
> > were used as the macros do not always evaluate their args which led to
> > an infinite loop.
> >
> > Just make them functions to ensure they always do so.
>
> Of course the best thing would be to kill these macros entirely.
> In-place endianess conversions are bad idea.
>
It's better than seeing this:
some_u32 = cpu_to_le32(some_u32);
But agreed, the 's' versions of the byteswapping api are a pretty good
sign something could be done better.
Harvey
prev parent reply other threads:[~2008-07-26 17:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 16:33 [PATCH] byteorder: force in-place endian conversion to always evaluate args Harvey Harrison
2008-07-25 18:14 ` H. Peter Anvin
2008-07-25 18:19 ` Harvey Harrison
2008-07-25 18:58 ` H. Peter Anvin
2008-07-25 18:22 ` Nish Aravamudan
2008-07-25 18:25 ` Harvey Harrison
2008-07-26 5:34 ` Christoph Hellwig
2008-07-26 17:46 ` Harvey Harrison [this message]
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=1217094397.5971.67.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.