aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2013-12-10 11:38:33 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2013-12-20 07:06:19 -0500
commit6f0be9b26621cefa6709b1d8bc15388eaf763126 (patch)
tree3feeb920543165bde282f3a8d869367331994534 /drivers/crypto/ccp
parente37b94ebffdd93d121e5308eb93e2e55a0893fbb (diff)
crypto: ccp - Fix sparse warnings in ccp-crypto-sha.c
The sha initialization data generated the following sparse warnings: sparse: incorrect type in initializer (different base types) expected unsigned int got restricted __be32 [usertype] <noident> Change the initialization data type from u32 to __be32. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp')
-rw-r--r--drivers/crypto/ccp/ccp-crypto-sha.c8
-rw-r--r--drivers/crypto/ccp/ccp-crypto.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-sha.c b/drivers/crypto/ccp/ccp-crypto-sha.c
index a6ef183f0afc..b0881df67534 100644
--- a/drivers/crypto/ccp/ccp-crypto-sha.c
+++ b/drivers/crypto/ccp/ccp-crypto-sha.c
@@ -324,20 +324,20 @@ static void ccp_hmac_sha_cra_exit(struct crypto_tfm *tfm)
324 ccp_sha_cra_exit(tfm); 324 ccp_sha_cra_exit(tfm);
325} 325}
326 326
327static const u32 sha1_init[CCP_SHA_CTXSIZE / sizeof(u32)] = { 327static const __be32 sha1_init[CCP_SHA_CTXSIZE / sizeof(__be32)] = {
328 cpu_to_be32(SHA1_H0), cpu_to_be32(SHA1_H1), 328 cpu_to_be32(SHA1_H0), cpu_to_be32(SHA1_H1),
329 cpu_to_be32(SHA1_H2), cpu_to_be32(SHA1_H3), 329 cpu_to_be32(SHA1_H2), cpu_to_be32(SHA1_H3),
330 cpu_to_be32(SHA1_H4), 0, 0, 0, 330 cpu_to_be32(SHA1_H4), 0, 0, 0,
331}; 331};
332 332
333static const u32 sha224_init[CCP_SHA_CTXSIZE / sizeof(u32)] = { 333static const __be32 sha224_init[CCP_SHA_CTXSIZE / sizeof(__be32)] = {
334 cpu_to_be32(SHA224_H0), cpu_to_be32(SHA224_H1), 334 cpu_to_be32(SHA224_H0), cpu_to_be32(SHA224_H1),
335 cpu_to_be32(SHA224_H2), cpu_to_be32(SHA224_H3), 335 cpu_to_be32(SHA224_H2), cpu_to_be32(SHA224_H3),
336 cpu_to_be32(SHA224_H4), cpu_to_be32(SHA224_H5), 336 cpu_to_be32(SHA224_H4), cpu_to_be32(SHA224_H5),
337 cpu_to_be32(SHA224_H6), cpu_to_be32(SHA224_H7), 337 cpu_to_be32(SHA224_H6), cpu_to_be32(SHA224_H7),
338}; 338};
339 339
340static const u32 sha256_init[CCP_SHA_CTXSIZE / sizeof(u32)] = { 340static const __be32 sha256_init[CCP_SHA_CTXSIZE / sizeof(__be32)] = {
341 cpu_to_be32(SHA256_H0), cpu_to_be32(SHA256_H1), 341 cpu_to_be32(SHA256_H0), cpu_to_be32(SHA256_H1),
342 cpu_to_be32(SHA256_H2), cpu_to_be32(SHA256_H3), 342 cpu_to_be32(SHA256_H2), cpu_to_be32(SHA256_H3),
343 cpu_to_be32(SHA256_H4), cpu_to_be32(SHA256_H5), 343 cpu_to_be32(SHA256_H4), cpu_to_be32(SHA256_H5),
@@ -347,7 +347,7 @@ static const u32 sha256_init[CCP_SHA_CTXSIZE / sizeof(u32)] = {
347struct ccp_sha_def { 347struct ccp_sha_def {
348 const char *name; 348 const char *name;
349 const char *drv_name; 349 const char *drv_name;
350 const u32 *init; 350 const __be32 *init;
351 enum ccp_sha_type type; 351 enum ccp_sha_type type;
352 u32 digest_size; 352 u32 digest_size;
353 u32 block_size; 353 u32 block_size;
diff --git a/drivers/crypto/ccp/ccp-crypto.h b/drivers/crypto/ccp/ccp-crypto.h
index 45f17c394e4a..13ea6ea4b45d 100644
--- a/drivers/crypto/ccp/ccp-crypto.h
+++ b/drivers/crypto/ccp/ccp-crypto.h
@@ -39,7 +39,7 @@ struct ccp_crypto_ablkcipher_alg {
39struct ccp_crypto_ahash_alg { 39struct ccp_crypto_ahash_alg {
40 struct list_head entry; 40 struct list_head entry;
41 41
42 const u32 *init; 42 const __be32 *init;
43 u32 type; 43 u32 type;
44 u32 mode; 44 u32 mode;
45 45