Re: [PATCH 1/2] dcache: allow word-at-a-time name hashing withbig-endian CPUs

From: Christoph Hellwig
Date: Thu Dec 12 2013 - 13:46:13 EST


> +#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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/