From: "H. Peter Anvin" <hpa@zytor.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
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: Fri, 25 Jul 2008 14:58:07 -0400 [thread overview]
Message-ID: <488A223F.80709@zytor.com> (raw)
In-Reply-To: <1217009975.5971.21.camel@brick>
Harvey Harrison wrote:
>> For what it's worth, the way to write a macro like this:
>>
>> #define __cpu_to_be64s(x) ((void)(x))
>
> If you've looked at the byteorder rework I've done in -mm, these get
> unified in a single include/linux/byteorder.h and look like:
[inline functions]
What I meant with the above, was that it seems poorly understood how to
write an empty "function-like" macro.
Obviously, inline functions don't have this problem, and is generally
better anyway (type-safe even in the empty condition, for example.)
-hpa
next prev parent reply other threads:[~2008-07-25 18:58 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 [this message]
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
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=488A223F.80709@zytor.com \
--to=hpa@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=harvey.harrison@gmail.com \
--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.