summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Jordan <kernel@cdqe.de>2020-10-16 06:11:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 11:07:10 +0300
commit6f0344af61d575d1192a3dac863e671a5d7ff019 (patch)
tree89320264416dd0a5a13ba236290e3d35b9d1ae03 /lib
parent83dde43b50728377d5d383c50cee42b9a92422c4 (diff)
downloadlinux-6f0344af61d575d1192a3dac863e671a5d7ff019.tar.xz
lib/crc32.c: fix trivial typo in preprocessor condition
[ Upstream commit 904542dc56524f921a6bab0639ff6249c01e775f ] 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: 46c5801eaf86 ("crc32: bolt on crc32c") Signed-off-by: Tobias Jordan <kernel@cdqe.de> Signed-off-by: Andrew 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.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/crc32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crc32.c b/lib/crc32.c
index 6ddc92bc1460..a1ccb4a8a995 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -327,7 +327,7 @@ static inline u32 __pure crc32_be_generic(u32 crc, unsigned char const *p,
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)
{
return crc32_be_generic(crc, p, len, NULL, CRCPOLY_BE);