Lines Matching refs:len
57 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) argument
84 if (unlikely((long)buf & 3 && len)) {
87 } while ((--len) && ((long)buf)&3);
91 rem_len = len & 3;
92 len = len >> 2;
94 rem_len = len & 7;
95 len = len >> 3;
101 for (i = 0; i < len; i++) {
103 for (--b; len; --len) {
114 len = rem_len;
116 if (len) {
119 for (i = 0; i < len; i++)
124 } while (--len);
146 size_t len, const u32 (*tab)[256], argument
151 while (len--) {
157 while (len--) {
165 while (len--) {
172 while (len--) {
178 crc = crc32_body(crc, p, len, tab);
185 u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len) argument
187 return crc32_le_generic(crc, p, len, NULL, CRCPOLY_LE);
189 u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len) argument
191 return crc32_le_generic(crc, p, len, NULL, CRC32C_POLY_LE);
194 u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len) argument
196 return crc32_le_generic(crc, p, len,
199 u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len) argument
201 return crc32_le_generic(crc, p, len,
239 static u32 __attribute_const__ crc32_generic_shift(u32 crc, size_t len, argument
246 for (i = 0; i < 8 * (int)(len & 3); i++)
249 len >>= 2;
250 if (!len)
255 if (len & 1)
258 len >>= 1;
259 if (!len)
269 u32 __attribute_const__ crc32_le_shift(u32 crc, size_t len) argument
271 return crc32_generic_shift(crc, len, CRCPOLY_LE);
274 u32 __attribute_const__ __crc32c_le_shift(u32 crc, size_t len) argument
276 return crc32_generic_shift(crc, len, CRC32C_POLY_LE);
291 size_t len, const u32 (*tab)[256], argument
296 while (len--) {
304 while (len--) {
312 while (len--) {
318 while (len--) {
324 crc = crc32_body(crc, p, len, tab);
331 u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) argument
333 return crc32_be_generic(crc, p, len, NULL, CRCPOLY_BE);
336 u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) argument
338 return crc32_be_generic(crc, p, len,