Thread (1 message) 1 message, 1 author, 2011-08-05

Re: [patch v2 01/37] add slice by 8 algorithm to crc32.c

From: Bart Van Assche <hidden>
Date: 2011-08-05 18:39:48

On Sun, Jul 24, 2011 at 9:43 PM, [off-list ref] wrote:
-#if CRC_BE_BITS > 8 || CRC_BE_BITS < 1 || CRC_BE_BITS & CRC_BE_BITS-1
-# error CRC_BE_BITS must be a power of 2 between 1 and 8
+#if CRC_BE_BITS > 64 || CRC_BE_BITS < 1 || CRC_BE_BITS == 16 || \
+       CRC_BE_BITS & CRC_BE_BITS-1
+# error "CRC_BE_BITS must be one of {1, 2, 4, 8, 32, 64}"
 #endif
It's a little unfortunate that Roland's macro
BUILD_BUG_ON_NOT_POWER_OF_2() can't be used in the above - that would
make the "CRC_BE_BITS & CRC_BE_BITS-1" part more readable.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help