Lines Matching refs:len
58 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) argument
85 if (unlikely((long)buf & 3 && len)) {
88 } while ((--len) && ((long)buf)&3);
92 rem_len = len & 3;
93 len = len >> 2;
95 rem_len = len & 7;
96 len = len >> 3;
102 for (i = 0; i < len; i++) {
104 for (--b; len; --len) {
115 len = rem_len;
117 if (len) {
120 for (i = 0; i < len; i++)
125 } while (--len);
147 size_t len, const u32 (*tab)[256], argument
152 while (len--) {
158 while (len--) {
166 while (len--) {
173 while (len--) {
179 crc = crc32_body(crc, p, len, tab);
186 u32 __pure __weak crc32_le(u32 crc, unsigned char const *p, size_t len) argument
188 return crc32_le_generic(crc, p, len, NULL, CRC32_POLY_LE);
190 u32 __pure __weak __crc32c_le(u32 crc, unsigned char const *p, size_t len) argument
192 return crc32_le_generic(crc, p, len, NULL, CRC32C_POLY_LE);
195 u32 __pure __weak crc32_le(u32 crc, unsigned char const *p, size_t len) argument
197 return crc32_le_generic(crc, p, len, crc32table_le, CRC32_POLY_LE);
199 u32 __pure __weak __crc32c_le(u32 crc, unsigned char const *p, size_t len) argument
201 return crc32_le_generic(crc, p, len, crc32ctable_le, CRC32C_POLY_LE);
242 static u32 __attribute_const__ crc32_generic_shift(u32 crc, size_t len, argument
249 for (i = 0; i < 8 * (int)(len & 3); i++)
252 len >>= 2;
253 if (!len)
258 if (len & 1)
261 len >>= 1;
262 if (!len)
272 u32 __attribute_const__ crc32_le_shift(u32 crc, size_t len) argument
274 return crc32_generic_shift(crc, len, CRC32_POLY_LE);
277 u32 __attribute_const__ __crc32c_le_shift(u32 crc, size_t len) argument
279 return crc32_generic_shift(crc, len, CRC32C_POLY_LE);
294 size_t len, const u32 (*tab)[256], argument
299 while (len--) {
307 while (len--) {
315 while (len--) {
321 while (len--) {
327 crc = crc32_body(crc, p, len, tab);
334 u32 __pure __weak crc32_be(u32 crc, unsigned char const *p, size_t len) argument
336 return crc32_be_generic(crc, p, len, NULL, CRC32_POLY_BE);
339 u32 __pure __weak crc32_be(u32 crc, unsigned char const *p, size_t len) argument
341 return crc32_be_generic(crc, p, len, crc32table_be, CRC32_POLY_BE);