Skip to content

Commit

Permalink
lib/crc32.c: fix trivial typo in preprocessor condition
Browse files Browse the repository at this point in the history
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: 46c5801 ("crc32: bolt on crc32c")
Signed-off-by: Tobias Jordan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Tobias Jordan authored and torvalds committed Oct 16, 2020
1 parent f3c9d0a commit 904542d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/crc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,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, CRC32_POLY_BE);
Expand Down

0 comments on commit 904542d

Please sign in to comment.