diff options
author | Jonathan Corbet <corbet@lwn.net> | 2017-03-07 00:22:51 -0700 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2017-03-07 00:22:51 -0700 |
commit | 07d045372921bfaa843ea00749c150b099ca0a49 (patch) | |
tree | f849e8432047d3e0fc04590ddfb6a76ba953f9b6 /crypto/cts.c | |
parent | 1bd9a34ffdd5f22ef74ed68b5d8b6fb4b781d58c (diff) | |
parent | 4c6427919ee920d5963cf826de76292286342aa0 (diff) | |
download | linux-crypto-07d045372921bfaa843ea00749c150b099ca0a49.tar.gz linux-crypto-07d045372921bfaa843ea00749c150b099ca0a49.zip |
Merge tag 'v4.11-rc1' into docs-next
Linux 4.11-rc1
Diffstat (limited to '')
-rw-r--r-- | crypto/cts.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/cts.c b/crypto/cts.c index 00254d76..243f591d 100644 --- a/crypto/cts.c +++ b/crypto/cts.c @@ -49,6 +49,7 @@ #include <linux/scatterlist.h> #include <crypto/scatterwalk.h> #include <linux/slab.h> +#include <linux/compiler.h> struct crypto_cts_ctx { struct crypto_skcipher *child; @@ -103,7 +104,7 @@ static int cts_cbc_encrypt(struct skcipher_request *req) struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); struct skcipher_request *subreq = &rctx->subreq; int bsize = crypto_skcipher_blocksize(tfm); - u8 d[bsize * 2] __attribute__ ((aligned(__alignof__(u32)))); + u8 d[bsize * 2] __aligned(__alignof__(u32)); struct scatterlist *sg; unsigned int offset; int lastn; @@ -183,7 +184,7 @@ static int cts_cbc_decrypt(struct skcipher_request *req) struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); struct skcipher_request *subreq = &rctx->subreq; int bsize = crypto_skcipher_blocksize(tfm); - u8 d[bsize * 2] __attribute__ ((aligned(__alignof__(u32)))); + u8 d[bsize * 2] __aligned(__alignof__(u32)); struct scatterlist *sg; unsigned int offset; u8 *space; @@ -373,9 +374,6 @@ static int crypto_cts_create(struct crypto_template *tmpl, struct rtattr **tb) inst->alg.base.cra_blocksize = alg->base.cra_blocksize; inst->alg.base.cra_alignmask = alg->base.cra_alignmask; - /* We access the data as u32s when xoring. */ - inst->alg.base.cra_alignmask |= __alignof__(u32) - 1; - inst->alg.ivsize = alg->base.cra_blocksize; inst->alg.chunksize = crypto_skcipher_alg_chunksize(alg); inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg); |