Skip to content

Commit 75d8a55

Browse files
ebiggersherbertx
authored andcommitted
crypto: x86/glue_helper - rename glue_skwalk_fpu_begin()
There are no users of the original glue_fpu_begin() anymore, so rename glue_skwalk_fpu_begin() to glue_fpu_begin() so that it matches glue_fpu_end() again. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 0d87d0f commit 75d8a55

3 files changed

Lines changed: 14 additions & 18 deletions

File tree

‎arch/x86/crypto/cast5_avx_glue.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ static int cast5_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key,
5050
static inline bool cast5_fpu_begin(bool fpu_enabled, struct skcipher_walk *walk,
5151
unsigned int nbytes)
5252
{
53-
return glue_skwalk_fpu_begin(CAST5_BLOCK_SIZE, CAST5_PARALLEL_BLOCKS,
54-
walk, fpu_enabled, nbytes);
53+
return glue_fpu_begin(CAST5_BLOCK_SIZE, CAST5_PARALLEL_BLOCKS,
54+
walk, fpu_enabled, nbytes);
5555
}
5656

5757
static inline void cast5_fpu_end(bool fpu_enabled)

‎arch/x86/crypto/glue_helper.c‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ int glue_ecb_req_128bit(const struct common_glue_ctx *gctx,
5050
unsigned int func_bytes;
5151
unsigned int i;
5252

53-
fpu_enabled = glue_skwalk_fpu_begin(bsize,
54-
gctx->fpu_blocks_limit,
55-
&walk, fpu_enabled, nbytes);
53+
fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
54+
&walk, fpu_enabled, nbytes);
5655
for (i = 0; i < gctx->num_funcs; i++) {
5756
func_bytes = bsize * gctx->funcs[i].num_blocks;
5857

@@ -129,9 +128,8 @@ int glue_cbc_decrypt_req_128bit(const struct common_glue_ctx *gctx,
129128
unsigned int i;
130129
u128 last_iv;
131130

132-
fpu_enabled = glue_skwalk_fpu_begin(bsize,
133-
gctx->fpu_blocks_limit,
134-
&walk, fpu_enabled, nbytes);
131+
fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
132+
&walk, fpu_enabled, nbytes);
135133
/* Start of the last block. */
136134
src += nbytes / bsize - 1;
137135
dst += nbytes / bsize - 1;
@@ -190,9 +188,8 @@ int glue_ctr_req_128bit(const struct common_glue_ctx *gctx,
190188
unsigned int i;
191189
le128 ctrblk;
192190

193-
fpu_enabled = glue_skwalk_fpu_begin(bsize,
194-
gctx->fpu_blocks_limit,
195-
&walk, fpu_enabled, nbytes);
191+
fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
192+
&walk, fpu_enabled, nbytes);
196193

197194
be128_to_le128(&ctrblk, (be128 *)walk.iv);
198195

@@ -291,9 +288,9 @@ int glue_xts_req_128bit(const struct common_glue_ctx *gctx,
291288
return err;
292289

293290
/* set minimum length to bsize, for tweak_fn */
294-
fpu_enabled = glue_skwalk_fpu_begin(bsize, gctx->fpu_blocks_limit,
295-
&walk, fpu_enabled,
296-
nbytes < bsize ? bsize : nbytes);
291+
fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
292+
&walk, fpu_enabled,
293+
nbytes < bsize ? bsize : nbytes);
297294

298295
/* calculate first value of T */
299296
tweak_fn(tweak_ctx, walk.iv, walk.iv);

‎arch/x86/include/asm/crypto/glue_helper.h‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ struct common_glue_ctx {
4444
struct common_glue_func_entry funcs[];
4545
};
4646

47-
static inline bool glue_skwalk_fpu_begin(unsigned int bsize,
48-
int fpu_blocks_limit,
49-
struct skcipher_walk *walk,
50-
bool fpu_enabled, unsigned int nbytes)
47+
static inline bool glue_fpu_begin(unsigned int bsize, int fpu_blocks_limit,
48+
struct skcipher_walk *walk,
49+
bool fpu_enabled, unsigned int nbytes)
5150
{
5251
if (likely(fpu_blocks_limit < 0))
5352
return false;

0 commit comments

Comments
 (0)