aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-09 15:19:54 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-09 15:19:54 -0800
commitcb834e7cc0e8b223386f219c1d1986846c87c55f (patch)
tree09d0dcfa4dfe2693266bb712e6ef2bb9e064b69a
parentMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block (diff)
parent[LIB] crc32c: Keep intermediate crc state in cpu order (diff)
downloadlinux-dev-cb834e7cc0e8b223386f219c1d1986846c87c55f.tar.xz
linux-dev-cb834e7cc0e8b223386f219c1d1986846c87c55f.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: [LIB] crc32c: Keep intermediate crc state in cpu order
-rw-r--r--lib/libcrc32c.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c
index 802f11f0bf5b..b5c3287d8ea4 100644
--- a/lib/libcrc32c.c
+++ b/lib/libcrc32c.c
@@ -33,7 +33,6 @@
#include <linux/crc32c.h>
#include <linux/compiler.h>
#include <linux/module.h>
-#include <asm/byteorder.h>
MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations");
@@ -161,15 +160,13 @@ static const u32 crc32c_table[256] = {
*/
u32 __pure
-crc32c_le(u32 seed, unsigned char const *data, size_t length)
+crc32c_le(u32 crc, unsigned char const *data, size_t length)
{
- u32 crc = __cpu_to_le32(seed);
-
while (length--)
crc =
crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8);
- return __le32_to_cpu(crc);
+ return crc;
}
#endif /* CRC_LE_BITS == 8 */