[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <488A223F.80709@zytor.com>
Date: Fri, 25 Jul 2008 14:58:07 -0400
From: "H. Peter Anvin" <hpa@...or.com>
To: Harvey Harrison <harvey.harrison@...il.com>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
David Miller <davem@...emloft.net>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] byteorder: force in-place endian conversion to always
evaluate args
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists