mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
libcrc32c: Move implementation to crypto crc32c
This patch swaps the role of libcrc32c and crc32c. Previously the implementation was in libcrc32c and crc32c was a wrapper. Now the code is in crc32c and libcrc32c just calls the crypto layer. The reason for the change is to tap into the algorithm selection capability of the crypto API so that optimised implementations such as the one utilising Intel's CRC32C instruction can be used where available. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
8e3ee85e68
commit
69c35efcf1
5 changed files with 156 additions and 169 deletions
|
@ -3,9 +3,6 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
extern u32 crc32c_le(u32 crc, unsigned char const *address, size_t length);
|
||||
extern u32 crc32c_be(u32 crc, unsigned char const *address, size_t length);
|
||||
|
||||
#define crc32c(seed, data, length) crc32c_le(seed, (unsigned char const *)data, length)
|
||||
extern u32 crc32c(u32 crc, const void *address, unsigned int length);
|
||||
|
||||
#endif /* _LINUX_CRC32C_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue