aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorkbuild test robot <fengguang.wu@intel.com>2013-09-23 20:21:29 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2013-10-07 02:16:57 -0400
commitea493d324f6ae26907e3d99fb0dc7a89083ad798 (patch)
treee208c10e8d67a1c7f729cc60296f4ac5abee0f17 /crypto
parentac1ed0c0e1a3b52cac89aae92ebc55fd4c19be77 (diff)
crypto: ablk_helper - Replace memcpy with struct assignment
tree: git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 48e6dc1b2a1ad8186d48968d5018912bdacac744 commit: a62b01cd6cc1feb5e80d64d6937c291473ed82cb [20/24] crypto: create generic version of ablk_helper coccinelle warnings: (new ones prefixed by >>) >> crypto/ablk_helper.c:97:2-8: Replace memcpy with struct assignment >> crypto/ablk_helper.c:78:2-8: Replace memcpy with struct assignment Please consider folding the attached diff :-) Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ablk_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ablk_helper.c b/crypto/ablk_helper.c
index 62568b1fc885..ffe7278d4bd8 100644
--- a/crypto/ablk_helper.c
+++ b/crypto/ablk_helper.c
@@ -75,7 +75,7 @@ int ablk_encrypt(struct ablkcipher_request *req)
75 struct ablkcipher_request *cryptd_req = 75 struct ablkcipher_request *cryptd_req =
76 ablkcipher_request_ctx(req); 76 ablkcipher_request_ctx(req);
77 77
78 memcpy(cryptd_req, req, sizeof(*req)); 78 *cryptd_req = *req;
79 ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); 79 ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base);
80 80
81 return crypto_ablkcipher_encrypt(cryptd_req); 81 return crypto_ablkcipher_encrypt(cryptd_req);
@@ -94,7 +94,7 @@ int ablk_decrypt(struct ablkcipher_request *req)
94 struct ablkcipher_request *cryptd_req = 94 struct ablkcipher_request *cryptd_req =
95 ablkcipher_request_ctx(req); 95 ablkcipher_request_ctx(req);
96 96
97 memcpy(cryptd_req, req, sizeof(*req)); 97 *cryptd_req = *req;
98 ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); 98 ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base);
99 99
100 return crypto_ablkcipher_decrypt(cryptd_req); 100 return crypto_ablkcipher_decrypt(cryptd_req);