From 355351fc1dde9bd2c525e40c6228b9db07d95cae Mon Sep 17 00:00:00 2001 From: David Miller Date: Fri, 15 Feb 2008 11:20:02 -0500 Subject: CRC32C big endian bugs... The CRC32C implementation in the btrfs progs is different from the one in the kernel, so obviously nothing can possibly work on big-endian. --- crc32c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crc32c.c') diff --git a/crc32c.c b/crc32c.c index f07ba13c..4dc5f9cd 100644 --- a/crc32c.c +++ b/crc32c.c @@ -91,13 +91,11 @@ static const u32 crc32c_table[256] = { * crc using table. */ -u32 crc32c_le(u32 seed, unsigned char const *data, size_t length) +u32 crc32c_le(u32 crc, unsigned char const *data, size_t length) { - u32 crc = (__force __u32)(cpu_to_le32(seed)); - while (length--) crc = crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8); - return le32_to_cpu((__force __le32)crc); + return crc; } -- cgit v1.2.3