mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00

With the "crct10dif" algorithm having been removed from the crypto API, crc_t10dif_is_optimized() is no longer used. Acked-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250208175647.12333-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
23 lines
536 B
C
23 lines
536 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_CRC_T10DIF_H
|
|
#define _LINUX_CRC_T10DIF_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
u16 crc_t10dif_arch(u16 crc, const u8 *p, size_t len);
|
|
u16 crc_t10dif_generic(u16 crc, const u8 *p, size_t len);
|
|
|
|
static inline u16 crc_t10dif_update(u16 crc, const u8 *p, size_t len)
|
|
{
|
|
if (IS_ENABLED(CONFIG_CRC_T10DIF_ARCH))
|
|
return crc_t10dif_arch(crc, p, len);
|
|
return crc_t10dif_generic(crc, p, len);
|
|
}
|
|
|
|
static inline u16 crc_t10dif(const u8 *p, size_t len)
|
|
{
|
|
return crc_t10dif_update(0, p, len);
|
|
}
|
|
|
|
#endif
|