mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
lib/crc: Use consistent naming for CRC-32 polynomials
Header was defining CRCPOLY_LE/BE and CRC32C_POLY_LE but in fact all of them are CRC-32 polynomials so use consistent naming. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
1fb2e3f276
commit
e37f2f93af
@@ -58,7 +58,7 @@ static void crc32init_le_generic(const uint32_t polynomial,
|
||||
|
||||
static void crc32init_le(void)
|
||||
{
|
||||
crc32init_le_generic(CRCPOLY_LE, crc32table_le);
|
||||
crc32init_le_generic(CRC32_POLY_LE, crc32table_le);
|
||||
}
|
||||
|
||||
static void crc32cinit_le(void)
|
||||
@@ -77,7 +77,7 @@ static void crc32init_be(void)
|
||||
crc32table_be[0][0] = 0;
|
||||
|
||||
for (i = 1; i < BE_TABLE_SIZE; i <<= 1) {
|
||||
crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0);
|
||||
crc = (crc << 1) ^ ((crc & 0x80000000) ? CRC32_POLY_BE : 0);
|
||||
for (j = 0; j < i; j++)
|
||||
crc32table_be[0][i + j] = crc ^ crc32table_be[0][j];
|
||||
}
|
||||
|
Reference in New Issue
Block a user