lkml.org 
[lkml]   [2013]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] dcache: allow word-at-a-time name hashing with big-endian CPUs
> +#ifdef __BIG_ENDIAN
> + mask = ~(~0ul >> tcount*8);
> +#else
> mask = ~(~0ul << tcount*8);
> +#endif
> return unlikely(!!((a ^ b) & mask));

> +#ifdef __BIG_ENDIAN
> + mask = ~(~0ul >> len*8);
> +#else
> mask = ~(~0ul << len*8);
> +#endif

This should really be a common helper.


\
 
 \ /
  Last update: 2013-12-12 20:41    [W:0.050 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site