[lkml]   [2007]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ubi: kill homegrown endian macros
On Thu, May 17, 2007 at 09:42:34PM +0100, Al Viro wrote:
> Ahem... So what does
> x |= y;
> turns into with that approach?

Another case is

#define FLAG1 cpu_to_be32(2)
#define FLAG2 cpu_to_be32(0x400)

if (packet_header->field & (FLAG1 | FLAG2))

which is a bloody common idiom in net/* and it happens on some pretty hot
paths. Approaches that would require converting it to something like
if (be32_to_cpu(packet_header->field) & (FLAG1 | FLAG2))
would be not just obnoxious, they would actually generate worse code.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-05-17 23:29    [W:0.242 / U:3.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site