lkml.org 
[lkml]   [2008]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2008-07-25 21:01    [from the cache]
©2003-2011 Jasper Spaans