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


 \ /
  Last update: 2008-07-25 21:01    [W:0.052 / U:9.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site