Lines Matching refs:len
62 u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
70 u32 crc32_le(u32 crc, unsigned char const *p, size_t len) in crc32_le() argument
73 while (len--) { in crc32_le()
82 u32 crc32_le(u32 crc, unsigned char const *p, size_t len) in crc32_le() argument
96 if((((long)b)&3 && len)){ in crc32_le()
101 } while ((--len) && ((long)b)&3 ); in crc32_le()
103 if((len >= 4)){ in crc32_le()
105 size_t save_len = len & 3; in crc32_le()
106 len = len >> 2; in crc32_le()
114 } while (--len); in crc32_le()
116 len = save_len; in crc32_le()
119 if(len){ in crc32_le()
124 } while (--len); in crc32_le()
132 while (len--) { in crc32_le()
139 while (len--) { in crc32_le()
158 u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len);
166 u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) in crc32_be() argument
169 while (len--) { in crc32_be()
180 u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) in crc32_be() argument
194 if(unlikely(((long)b)&3 && len)){ in crc32_be()
199 } while ((--len) && ((long)b)&3 ); in crc32_be()
201 if(likely(len >= 4)){ in crc32_be()
203 size_t save_len = len & 3; in crc32_be()
204 len = len >> 2; in crc32_be()
212 } while (--len); in crc32_be()
214 len = save_len; in crc32_be()
217 if(len){ in crc32_be()
222 } while (--len); in crc32_be()
229 while (len--) { in crc32_be()
236 while (len--) { in crc32_be()
385 buf_dump(char const *prefix, unsigned char const *buf, size_t len) in buf_dump() argument
388 while (len--) in buf_dump()
395 static void bytereverse(unsigned char *buf, size_t len) in bytereverse() argument
397 while (len--) { in bytereverse()
403 static void random_garbage(unsigned char *buf, size_t len) in random_garbage() argument
405 while (len--) in random_garbage()
433 static u32 test_step(u32 init, unsigned char *buf, size_t len) in test_step() argument
438 crc1 = crc32_be(init, buf, len); in test_step()
439 store_be(crc1, buf + len); in test_step()
440 crc2 = crc32_be(init, buf, len + 4); in test_step()
445 for (i = 0; i <= len + 4; i++) { in test_step()
447 crc2 = crc32_be(crc2, buf + i, len + 4 - i); in test_step()
454 bytereverse(buf, len + 4); in test_step()
460 crc1 = crc32_le(init, buf, len); in test_step()
464 crc2 = crc32_le(init, buf, len + 4); in test_step()
469 for (i = 0; i <= len + 4; i++) { in test_step()
471 crc2 = crc32_le(crc2, buf + i, len + 4 - i); in test_step()