mirror of
https://github.com/intel/isa-l.git
synced 2025-10-28 11:31:51 +01:00
include: reformat using new code style
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
This commit is contained in:
committed by
Pablo de Lara
parent
55fbfabfc6
commit
fa5b8baf84
115
include/crc.h
115
include/crc.h
@@ -27,13 +27,11 @@
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file crc.h
|
||||
* @brief CRC functions.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _CRC_H_
|
||||
#define _CRC_H_
|
||||
|
||||
@@ -43,7 +41,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Multi-binary functions */
|
||||
|
||||
/**
|
||||
@@ -54,12 +51,11 @@ extern "C" {
|
||||
*
|
||||
* @returns 16 bit CRC
|
||||
*/
|
||||
uint16_t crc16_t10dif(
|
||||
uint16_t init_crc, //!< initial CRC value, 16 bits
|
||||
const unsigned char *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
uint16_t
|
||||
crc16_t10dif(uint16_t init_crc, //!< initial CRC value, 16 bits
|
||||
const unsigned char *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate CRC and copy T10 standard, runs appropriate version.
|
||||
@@ -68,13 +64,12 @@ uint16_t crc16_t10dif(
|
||||
*
|
||||
* @returns 16 bit CRC
|
||||
*/
|
||||
uint16_t crc16_t10dif_copy(
|
||||
uint16_t init_crc, //!< initial CRC value, 16 bits
|
||||
uint8_t *dst, //!< buffer destination for copy
|
||||
uint8_t *src, //!< buffer source to crc + copy
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
uint16_t
|
||||
crc16_t10dif_copy(uint16_t init_crc, //!< initial CRC value, 16 bits
|
||||
uint8_t *dst, //!< buffer destination for copy
|
||||
uint8_t *src, //!< buffer source to crc + copy
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate CRC from the IEEE standard, runs appropriate version.
|
||||
@@ -96,11 +91,11 @@ uint16_t crc16_t10dif_copy(
|
||||
* @returns 32 bit CRC
|
||||
*/
|
||||
|
||||
uint32_t crc32_ieee(
|
||||
uint32_t init_crc, //!< initial CRC value, 32 bits
|
||||
const unsigned char *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
uint32_t
|
||||
crc32_ieee(uint32_t init_crc, //!< initial CRC value, 32 bits
|
||||
const unsigned char *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate the customized CRC
|
||||
@@ -124,12 +119,11 @@ uint32_t crc32_ieee(
|
||||
*
|
||||
* @returns 32 bit CRC
|
||||
*/
|
||||
uint32_t crc32_gzip_refl(
|
||||
uint32_t init_crc, //!< initial CRC value, 32 bits
|
||||
const unsigned char *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
uint32_t
|
||||
crc32_gzip_refl(uint32_t init_crc, //!< initial CRC value, 32 bits
|
||||
const unsigned char *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief ISCSI CRC function, runs appropriate version.
|
||||
@@ -139,12 +133,11 @@ uint32_t crc32_gzip_refl(
|
||||
*
|
||||
* @returns 32 bit CRC
|
||||
*/
|
||||
unsigned int crc32_iscsi(
|
||||
unsigned char *buffer, //!< buffer to calculate CRC on
|
||||
int len, //!< buffer length in bytes
|
||||
unsigned int init_crc //!< initial CRC value
|
||||
);
|
||||
|
||||
unsigned int
|
||||
crc32_iscsi(unsigned char *buffer, //!< buffer to calculate CRC on
|
||||
int len, //!< buffer length in bytes
|
||||
unsigned int init_crc //!< initial CRC value
|
||||
);
|
||||
|
||||
/* Base functions */
|
||||
|
||||
@@ -152,45 +145,42 @@ unsigned int crc32_iscsi(
|
||||
* @brief ISCSI CRC function, baseline version
|
||||
* @returns 32 bit CRC
|
||||
*/
|
||||
unsigned int crc32_iscsi_base(
|
||||
unsigned char *buffer, //!< buffer to calculate CRC on
|
||||
int len, //!< buffer length in bytes
|
||||
unsigned int crc_init //!< initial CRC value
|
||||
);
|
||||
|
||||
unsigned int
|
||||
crc32_iscsi_base(unsigned char *buffer, //!< buffer to calculate CRC on
|
||||
int len, //!< buffer length in bytes
|
||||
unsigned int crc_init //!< initial CRC value
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate CRC from the T10 standard, runs baseline version
|
||||
* @returns 16 bit CRC
|
||||
*/
|
||||
uint16_t crc16_t10dif_base(
|
||||
uint16_t seed, //!< initial CRC value, 16 bits
|
||||
uint8_t *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
uint16_t
|
||||
crc16_t10dif_base(uint16_t seed, //!< initial CRC value, 16 bits
|
||||
uint8_t *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate CRC and copy T10 standard, runs baseline version.
|
||||
* @returns 16 bit CRC
|
||||
*/
|
||||
uint16_t crc16_t10dif_copy_base(
|
||||
uint16_t init_crc, //!< initial CRC value, 16 bits
|
||||
uint8_t *dst, //!< buffer destination for copy
|
||||
uint8_t *src, //!< buffer source to crc + copy
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
uint16_t
|
||||
crc16_t10dif_copy_base(uint16_t init_crc, //!< initial CRC value, 16 bits
|
||||
uint8_t *dst, //!< buffer destination for copy
|
||||
uint8_t *src, //!< buffer source to crc + copy
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate CRC from the IEEE standard, runs baseline version
|
||||
* @returns 32 bit CRC
|
||||
*/
|
||||
uint32_t crc32_ieee_base(
|
||||
uint32_t seed, //!< initial CRC value, 32 bits
|
||||
uint8_t *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
uint32_t
|
||||
crc32_ieee_base(uint32_t seed, //!< initial CRC value, 32 bits
|
||||
uint8_t *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate the customized CRC
|
||||
@@ -198,12 +188,11 @@ uint32_t crc32_ieee_base(
|
||||
* runs baseline version
|
||||
* @returns 32 bit CRC
|
||||
*/
|
||||
uint32_t crc32_gzip_refl_base(
|
||||
uint32_t seed, //!< initial CRC value, 32 bits
|
||||
uint8_t *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
uint32_t
|
||||
crc32_gzip_refl_base(uint32_t seed, //!< initial CRC value, 32 bits
|
||||
uint8_t *buf, //!< buffer to calculate CRC on
|
||||
uint64_t len //!< buffer length in bytes (64-bit data)
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user