Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/crc32: rename __crc32c_le_combine() to crc32c_combine()

Since the Castagnoli CRC32 is now always just crc32c(), rename
__crc32c_le_combine() and __crc32c_le_shift() accordingly.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250208024911.14936-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>

+21 -23
+2 -2
drivers/infiniband/sw/siw/siw.h
··· 676 676 static inline __wsum siw_csum_combine(__wsum csum, __wsum csum2, int offset, 677 677 int len) 678 678 { 679 - return (__force __wsum)__crc32c_le_combine((__force __u32)csum, 680 - (__force __u32)csum2, len); 679 + return (__force __wsum)crc32c_combine((__force __u32)csum, 680 + (__force __u32)csum2, len); 681 681 } 682 682 683 683 static inline void siw_crc_skb(struct siw_rx_stream *srx, unsigned int len)
+13 -15
include/linux/crc32.h
··· 76 76 return crc32_le_shift(crc1, len2) ^ crc2; 77 77 } 78 78 79 + u32 crc32c_shift(u32 crc, size_t len); 80 + 79 81 /** 80 - * __crc32c_le_combine - Combine two crc32c check values into one. For two 81 - * sequences of bytes, seq1 and seq2 with lengths len1 82 - * and len2, __crc32c_le() check values were calculated 83 - * for each, crc1 and crc2. 82 + * crc32c_combine - Combine two crc32c check values into one. For two sequences 83 + * of bytes, seq1 and seq2 with lengths len1 and len2, crc32c() 84 + * check values were calculated for each, crc1 and crc2. 84 85 * 85 86 * @crc1: crc32c of the first block 86 87 * @crc2: crc32c of the second block 87 88 * @len2: length of the second block 88 89 * 89 - * Return: The __crc32c_le() check value of seq1 and seq2 concatenated, 90 - * requiring only crc1, crc2, and len2. Note: If seq_full denotes 91 - * the concatenated memory area of seq1 with seq2, and crc_full 92 - * the __crc32c_le() value of seq_full, then crc_full == 93 - * __crc32c_le_combine(crc1, crc2, len2) when crc_full was 94 - * seeded with the same initializer as crc1, and crc2 seed 95 - * was 0. See also crc32c_combine_test(). 90 + * Return: The crc32c() check value of seq1 and seq2 concatenated, requiring 91 + * only crc1, crc2, and len2. Note: If seq_full denotes the concatenated 92 + * memory area of seq1 with seq2, and crc_full the crc32c() value of 93 + * seq_full, then crc_full == crc32c_combine(crc1, crc2, len2) when 94 + * crc_full was seeded with the same initializer as crc1, and crc2 seed 95 + * was 0. See also crc_combine_test(). 96 96 */ 97 - u32 __crc32c_le_shift(u32 crc, size_t len); 98 - 99 - static inline u32 __crc32c_le_combine(u32 crc1, u32 crc2, size_t len2) 97 + static inline u32 crc32c_combine(u32 crc1, u32 crc2, size_t len2) 100 98 { 101 - return __crc32c_le_shift(crc1, len2) ^ crc2; 99 + return crc32c_shift(crc1, len2) ^ crc2; 102 100 } 103 101 104 102 #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length)
+2 -2
include/net/sctp/checksum.h
··· 36 36 static inline __wsum sctp_csum_combine(__wsum csum, __wsum csum2, 37 37 int offset, int len) 38 38 { 39 - return (__force __wsum)__crc32c_le_combine((__force __u32)csum, 40 - (__force __u32)csum2, len); 39 + return (__force __wsum)crc32c_combine((__force __u32)csum, 40 + (__force __u32)csum2, len); 41 41 } 42 42 43 43 static const struct skb_checksum_ops sctp_csum_ops = {
+3 -3
lib/crc32.c
··· 117 117 { 118 118 return crc32_generic_shift(crc, len, CRC32_POLY_LE); 119 119 } 120 + EXPORT_SYMBOL(crc32_le_shift); 120 121 121 - u32 __crc32c_le_shift(u32 crc, size_t len) 122 + u32 crc32c_shift(u32 crc, size_t len) 122 123 { 123 124 return crc32_generic_shift(crc, len, CRC32C_POLY_LE); 124 125 } 125 - EXPORT_SYMBOL(crc32_le_shift); 126 - EXPORT_SYMBOL(__crc32c_le_shift); 126 + EXPORT_SYMBOL(crc32c_shift); 127 127 128 128 u32 crc32_be_base(u32 crc, const u8 *p, size_t len) 129 129 {
+1 -1
lib/crc_kunit.c
··· 363 363 364 364 static u64 crc32c_combine_wrapper(u64 crc1, u64 crc2, size_t len2) 365 365 { 366 - return __crc32c_le_combine(crc1, crc2, len2); 366 + return crc32c_combine(crc1, crc2, len2); 367 367 } 368 368 369 369 static const struct crc_variant crc_variant_crc32c = {