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

crypto: polyval - Rename conflicting functions

Rename polyval_init() and polyval_update(), in preparation for adding
library functions with the same name to <crypto/polyval.h>.

Note that polyval-generic.c will be removed later, as it will be
superseded by the library. This commit just keeps the kernel building
for the initial introduction of the library.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251109234726.638437-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

+6 -6
+6 -6
crypto/polyval-generic.c
··· 99 99 return 0; 100 100 } 101 101 102 - static int polyval_init(struct shash_desc *desc) 102 + static int polyval_generic_init(struct shash_desc *desc) 103 103 { 104 104 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); 105 105 ··· 108 108 return 0; 109 109 } 110 110 111 - static int polyval_update(struct shash_desc *desc, 112 - const u8 *src, unsigned int srclen) 111 + static int polyval_generic_update(struct shash_desc *desc, 112 + const u8 *src, unsigned int srclen) 113 113 { 114 114 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); 115 115 const struct polyval_tfm_ctx *ctx = crypto_shash_ctx(desc->tfm); ··· 135 135 u8 tmp[POLYVAL_BLOCK_SIZE] = {}; 136 136 137 137 memcpy(tmp, src, len); 138 - polyval_update(desc, tmp, POLYVAL_BLOCK_SIZE); 138 + polyval_generic_update(desc, tmp, POLYVAL_BLOCK_SIZE); 139 139 } 140 140 copy_and_reverse(dst, dctx->buffer); 141 141 return 0; ··· 166 166 167 167 static struct shash_alg polyval_alg = { 168 168 .digestsize = POLYVAL_DIGEST_SIZE, 169 - .init = polyval_init, 170 - .update = polyval_update, 169 + .init = polyval_generic_init, 170 + .update = polyval_generic_update, 171 171 .finup = polyval_finup, 172 172 .setkey = polyval_setkey, 173 173 .export = polyval_export,