Commit 842c7e58 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull crypto fix from Herbert Xu:
 "Fix a regression in the MIPS CRC32C code"

* tag 'v6.12-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: mips/crc32 - fix the CRC32C implementation
parents d79944b0 dd41b283
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -123,20 +123,20 @@ static u32 crc32c_mips_le_hw(u32 crc_, const u8 *p, unsigned int len)
		for (; len >= sizeof(u64); p += sizeof(u64), len -= sizeof(u64)) {
			u64 value = get_unaligned_le64(p);

			CRC32(crc, value, d);
			CRC32C(crc, value, d);
		}

		if (len & sizeof(u32)) {
			u32 value = get_unaligned_le32(p);

			CRC32(crc, value, w);
			CRC32C(crc, value, w);
			p += sizeof(u32);
		}
	} else {
		for (; len >= sizeof(u32); len -= sizeof(u32)) {
			u32 value = get_unaligned_le32(p);

			CRC32(crc, value, w);
			CRC32C(crc, value, w);
			p += sizeof(u32);
		}
	}