Commit 66b3e887 authored by Kim Phillips's avatar Kim Phillips Committed by Herbert Xu

crypto: caam - change key gen functions to return signed int

commit 2af8f4a2 "crypto: caam - coccicheck fixes" added error
return values yet neglected to change the type from unsigned.
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 87de4579
...@@ -411,7 +411,7 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) ...@@ -411,7 +411,7 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash)
return 0; return 0;
} }
static u32 gen_split_hash_key(struct caam_hash_ctx *ctx, const u8 *key_in, static int gen_split_hash_key(struct caam_hash_ctx *ctx, const u8 *key_in,
u32 keylen) u32 keylen)
{ {
return gen_split_key(ctx->jrdev, ctx->key, ctx->split_key_len, return gen_split_key(ctx->jrdev, ctx->key, ctx->split_key_len,
...@@ -420,7 +420,7 @@ static u32 gen_split_hash_key(struct caam_hash_ctx *ctx, const u8 *key_in, ...@@ -420,7 +420,7 @@ static u32 gen_split_hash_key(struct caam_hash_ctx *ctx, const u8 *key_in,
} }
/* Digest hash size if it is too large */ /* Digest hash size if it is too large */
static u32 hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in,
u32 *keylen, u8 *key_out, u32 digestsize) u32 *keylen, u8 *key_out, u32 digestsize)
{ {
struct device *jrdev = ctx->jrdev; struct device *jrdev = ctx->jrdev;
......
...@@ -44,7 +44,7 @@ Split key generation----------------------------------------------- ...@@ -44,7 +44,7 @@ Split key generation-----------------------------------------------
[06] 0x64260028 fifostr: class2 mdsplit-jdk len=40 [06] 0x64260028 fifostr: class2 mdsplit-jdk len=40
@0xffe04000 @0xffe04000
*/ */
u32 gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len,
int split_key_pad_len, const u8 *key_in, u32 keylen, int split_key_pad_len, const u8 *key_in, u32 keylen,
u32 alg_op) u32 alg_op)
{ {
......
...@@ -12,6 +12,6 @@ struct split_key_result { ...@@ -12,6 +12,6 @@ struct split_key_result {
void split_key_done(struct device *dev, u32 *desc, u32 err, void *context); void split_key_done(struct device *dev, u32 *desc, u32 err, void *context);
u32 gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len,
int split_key_pad_len, const u8 *key_in, u32 keylen, int split_key_pad_len, const u8 *key_in, u32 keylen,
u32 alg_op); u32 alg_op);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment