diff options
author | kbuild test robot <fengguang.wu@intel.com> | 2013-09-24 08:21:29 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-10-07 14:16:57 +0800 |
commit | edc854d5eda74362cc4868015a6cc4be0e2deb71 (patch) | |
tree | 40064d8a54ffd8f8cc4763049176287841bda2c9 /crypto | |
parent | 8326676afcc69e61c6b6f17f68d667f4c2474676 (diff) | |
download | linux-crypto-edc854d5eda74362cc4868015a6cc4be0e2deb71.tar.gz linux-crypto-edc854d5eda74362cc4868015a6cc4be0e2deb71.zip |
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: 093a654aafa8c229cf530eb00b0175e29aaae0ab [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 '')
-rw-r--r-- | crypto/ablk_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ablk_helper.c b/crypto/ablk_helper.c index 62568b1f..ffe7278d 100644 --- a/crypto/ablk_helper.c +++ b/crypto/ablk_helper.c @@ -75,7 +75,7 @@ int ablk_encrypt(struct ablkcipher_request *req) struct ablkcipher_request *cryptd_req = ablkcipher_request_ctx(req); - memcpy(cryptd_req, req, sizeof(*req)); + *cryptd_req = *req; ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); return crypto_ablkcipher_encrypt(cryptd_req); @@ -94,7 +94,7 @@ int ablk_decrypt(struct ablkcipher_request *req) struct ablkcipher_request *cryptd_req = ablkcipher_request_ctx(req); - memcpy(cryptd_req, req, sizeof(*req)); + *cryptd_req = *req; ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); return crypto_ablkcipher_decrypt(cryptd_req); |