mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
lib/crc32: Make crc32_be weak for arch override
crc32_le and __crc32c_le can be overridden - extend this to crc32_be. Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
This commit is contained in:
parent
07770f673a
commit
3f03c05068
@ -206,6 +206,7 @@ EXPORT_SYMBOL(__crc32c_le);
|
||||
|
||||
u32 __pure crc32_le_base(u32, unsigned char const *, size_t) __alias(crc32_le);
|
||||
u32 __pure __crc32c_le_base(u32, unsigned char const *, size_t) __alias(__crc32c_le);
|
||||
u32 __pure crc32_be_base(u32, unsigned char const *, size_t) __alias(crc32_be);
|
||||
|
||||
/*
|
||||
* This multiplies the polynomials x and y modulo the given modulus.
|
||||
@ -329,13 +330,13 @@ static inline u32 __pure crc32_be_generic(u32 crc, unsigned char const *p,
|
||||
return crc;
|
||||
}
|
||||
|
||||
#if CRC_LE_BITS == 1
|
||||
u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
|
||||
#if CRC_BE_BITS == 1
|
||||
u32 __pure __weak crc32_be(u32 crc, unsigned char const *p, size_t len)
|
||||
{
|
||||
return crc32_be_generic(crc, p, len, NULL, CRC32_POLY_BE);
|
||||
}
|
||||
#else
|
||||
u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len)
|
||||
u32 __pure __weak crc32_be(u32 crc, unsigned char const *p, size_t len)
|
||||
{
|
||||
return crc32_be_generic(crc, p, len, crc32table_be, CRC32_POLY_BE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user