aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/drbg.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-12-07 15:36:57 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2015-12-10 09:39:44 -0500
commite4bc02aced3731776c8828d34e13c02ebdec3088 (patch)
tree776707fa22ba04c3fbdba35bc6a901c4fc6fd373 /crypto/drbg.c
parent161151d79ff4f7ed35d4ebb0eb7727a517c34ef2 (diff)
crypto: drbg - constify drbg_state_ops structures
The drbg_state_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/drbg.c')
-rw-r--r--crypto/drbg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c
index a7c23146b87f..ab6ef1d08568 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -626,7 +626,7 @@ out:
626 return len; 626 return len;
627} 627}
628 628
629static struct drbg_state_ops drbg_ctr_ops = { 629static const struct drbg_state_ops drbg_ctr_ops = {
630 .update = drbg_ctr_update, 630 .update = drbg_ctr_update,
631 .generate = drbg_ctr_generate, 631 .generate = drbg_ctr_generate,
632 .crypto_init = drbg_init_sym_kernel, 632 .crypto_init = drbg_init_sym_kernel,
@@ -752,7 +752,7 @@ static int drbg_hmac_generate(struct drbg_state *drbg,
752 return len; 752 return len;
753} 753}
754 754
755static struct drbg_state_ops drbg_hmac_ops = { 755static const struct drbg_state_ops drbg_hmac_ops = {
756 .update = drbg_hmac_update, 756 .update = drbg_hmac_update,
757 .generate = drbg_hmac_generate, 757 .generate = drbg_hmac_generate,
758 .crypto_init = drbg_init_hash_kernel, 758 .crypto_init = drbg_init_hash_kernel,
@@ -1032,7 +1032,7 @@ out:
1032 * scratchpad usage: as update and generate are used isolated, both 1032 * scratchpad usage: as update and generate are used isolated, both
1033 * can use the scratchpad 1033 * can use the scratchpad
1034 */ 1034 */
1035static struct drbg_state_ops drbg_hash_ops = { 1035static const struct drbg_state_ops drbg_hash_ops = {
1036 .update = drbg_hash_update, 1036 .update = drbg_hash_update,
1037 .generate = drbg_hash_generate, 1037 .generate = drbg_hash_generate,
1038 .crypto_init = drbg_init_hash_kernel, 1038 .crypto_init = drbg_init_hash_kernel,