X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibcrc32c.c;h=b5c3287d8ea47567220cbafd2211dd12b5239356;hb=f7160c7573615ec82c691e294cf80d920b5d588d;hp=802f11f0bf5baebf99460c1e4d238921764fab93;hpb=43cd73658d8077ee6899b0b5029aad0cba1e9f92;p=linux-2.6-omap-h63xx.git diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c index 802f11f0bf5..b5c3287d8ea 100644 --- a/lib/libcrc32c.c +++ b/lib/libcrc32c.c @@ -33,7 +33,6 @@ #include #include #include -#include MODULE_AUTHOR("Clay Haapala "); 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 */