Commit 904542dc authored by Tobias Jordan's avatar Tobias Jordan Committed by Linus Torvalds

lib/crc32.c: fix trivial typo in preprocessor condition

Whether crc32_be needs a lookup table is chosen based on CRC_LE_BITS.
Obviously, the _be function should be governed by the _BE_ define.

This probably never pops up as it's hard to come up with a configuration
where CRC_BE_BITS isn't the same as CRC_LE_BITS and as nobody is using
bitwise CRC anyway.

Fixes: 46c5801e ("crc32: bolt on crc32c")
Signed-off-by: default avatarTobias Jordan <kernel@cdqe.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lkml.kernel.org/r/20200923182122.GA3338@agrajag.zerfleddert.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f3c9d0a3
...@@ -331,7 +331,7 @@ static inline u32 __pure crc32_be_generic(u32 crc, unsigned char const *p, ...@@ -331,7 +331,7 @@ static inline u32 __pure crc32_be_generic(u32 crc, unsigned char const *p,
return crc; return crc;
} }
#if CRC_LE_BITS == 1 #if CRC_BE_BITS == 1
u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
{ {
return crc32_be_generic(crc, p, len, NULL, CRC32_POLY_BE); return crc32_be_generic(crc, p, len, NULL, CRC32_POLY_BE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment