MIPS: bcm63xx: nvram: avoid inefficient use of crc32_le_combine()
authorEric Biggers <ebiggers@google.com>
Sun, 11 May 2025 18:28:36 +0000 (11:28 -0700)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 20 May 2025 06:44:33 +0000 (08:44 +0200)
commit2695b3c7fe4fa06a377ea0d66e3fe5fdb60310f0
tree13951ced1a3c2d522fb9c5628444647961757c72
parent3590692a136d75e39cd67b0f23e032669fcdbcd2
MIPS: bcm63xx: nvram: avoid inefficient use of crc32_le_combine()

bcm963xx_nvram_checksum() was using crc32_le_combine() to update a CRC
with four zero bytes.  However, this is about 5x slower than just
CRC'ing four zero bytes in the normal way.  Just do that instead.

(We could instead make crc32_le_combine() faster on short lengths.  But
all its callers do just fine without it, so I'd like to just remove it.)

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
include/linux/bcm963xx_nvram.h