Lines Matching defs:len
70 static u32 crc32_mips_le_hw(u32 crc_, const u8 *p, unsigned int len)
75 while (len >= sizeof(u64)) {
80 len -= sizeof(u64);
83 if (len & sizeof(u32)) {
85 while (len >= sizeof(u32)) {
91 len -= sizeof(u32);
94 if (len & sizeof(u16)) {
101 if (len & sizeof(u8)) {
110 static u32 crc32c_mips_le_hw(u32 crc_, const u8 *p, unsigned int len)
115 while (len >= sizeof(u64)) {
120 len -= sizeof(u64);
123 if (len & sizeof(u32)) {
125 while (len >= sizeof(u32)) {
131 len -= sizeof(u32);
134 if (len & sizeof(u16)) {
141 if (len & sizeof(u8)) {
220 static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out)
222 put_unaligned_le32(crc32_mips_le_hw(crc, data, len), out);
226 static int __chksumc_finup(u32 crc, const u8 *data, unsigned int len, u8 *out)
228 put_unaligned_le32(~crc32c_mips_le_hw(crc, data, len), out);
233 unsigned int len, u8 *out)
237 return __chksum_finup(ctx->crc, data, len, out);
241 unsigned int len, u8 *out)
245 return __chksumc_finup(ctx->crc, data, len, out);