diff options
author | Kim Phillips <kim.phillips@freescale.com> | 2013-03-26 19:10:14 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-04-25 09:01:43 -0400 |
commit | 66b3e8879f42a571e6779a6c4e5ed486aaaf6fef (patch) | |
tree | ecb96d93086b34d2c6edb696709e0365cae9633f /drivers/crypto/caam | |
parent | 87de4579f92dbe50e92f33b94f8688793c894571 (diff) |
crypto: caam - change key gen functions to return signed int
commit 2af8f4a "crypto: caam - coccicheck fixes" added error
return values yet neglected to change the type from unsigned.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam')
-rw-r--r-- | drivers/crypto/caam/caamhash.c | 4 | ||||
-rw-r--r-- | drivers/crypto/caam/key_gen.c | 2 | ||||
-rw-r--r-- | drivers/crypto/caam/key_gen.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 32aba7a61503..5996521a1caf 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c | |||
@@ -411,7 +411,7 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) | |||
411 | return 0; | 411 | return 0; |
412 | } | 412 | } |
413 | 413 | ||
414 | static u32 gen_split_hash_key(struct caam_hash_ctx *ctx, const u8 *key_in, | 414 | static int gen_split_hash_key(struct caam_hash_ctx *ctx, const u8 *key_in, |
415 | u32 keylen) | 415 | u32 keylen) |
416 | { | 416 | { |
417 | return gen_split_key(ctx->jrdev, ctx->key, ctx->split_key_len, | 417 | 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 | } | 420 | } |
421 | 421 | ||
422 | /* Digest hash size if it is too large */ | 422 | /* Digest hash size if it is too large */ |
423 | static u32 hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, | 423 | static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, |
424 | u32 *keylen, u8 *key_out, u32 digestsize) | 424 | u32 *keylen, u8 *key_out, u32 digestsize) |
425 | { | 425 | { |
426 | struct device *jrdev = ctx->jrdev; | 426 | struct device *jrdev = ctx->jrdev; |
diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c index f6dba10246c3..87138d2adb5f 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c | |||
@@ -44,7 +44,7 @@ Split key generation----------------------------------------------- | |||
44 | [06] 0x64260028 fifostr: class2 mdsplit-jdk len=40 | 44 | [06] 0x64260028 fifostr: class2 mdsplit-jdk len=40 |
45 | @0xffe04000 | 45 | @0xffe04000 |
46 | */ | 46 | */ |
47 | u32 gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, | 47 | int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, |
48 | int split_key_pad_len, const u8 *key_in, u32 keylen, | 48 | int split_key_pad_len, const u8 *key_in, u32 keylen, |
49 | u32 alg_op) | 49 | u32 alg_op) |
50 | { | 50 | { |
diff --git a/drivers/crypto/caam/key_gen.h b/drivers/crypto/caam/key_gen.h index d95d290c6e8b..c5588f6d8109 100644 --- a/drivers/crypto/caam/key_gen.h +++ b/drivers/crypto/caam/key_gen.h | |||
@@ -12,6 +12,6 @@ struct split_key_result { | |||
12 | 12 | ||
13 | void split_key_done(struct device *dev, u32 *desc, u32 err, void *context); | 13 | void split_key_done(struct device *dev, u32 *desc, u32 err, void *context); |
14 | 14 | ||
15 | u32 gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, | 15 | int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, |
16 | int split_key_pad_len, const u8 *key_in, u32 keylen, | 16 | int split_key_pad_len, const u8 *key_in, u32 keylen, |
17 | u32 alg_op); | 17 | u32 alg_op); |