aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJoshua I. James <joshua@cybercrimetech.com>2014-12-05 00:06:16 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2014-12-22 07:02:35 -0500
commita861afbc931b489b3b2362f8011cccd2a071ec37 (patch)
tree22305cf312bee035283ff777c1e220e1e69b6408 /crypto
parentbe95f0fa0cde56bb05ed62488a25a73a5b21b2d9 (diff)
crypto: ablkcipher - fixed style errors in ablkcipher.c
Fixed style errors reported by checkpatch. WARNING: Missing a blank line after declarations + u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK); + return max(start, end_page); WARNING: line over 80 characters + scatterwalk_start(&walk->out, scatterwalk_sg_next(walk->out.sg)); WARNING: Missing a blank line after declarations + int err = ablkcipher_copy_iv(walk, tfm, alignmask); + if (err) ERROR: do not use assignment in if condition + if ((err = crypto_register_instance(tmpl, inst))) { Signed-off-by: Joshua I. James <joshua@cybercrimetech.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ablkcipher.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 40886c489903..7bbc8b4ef2e9 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -69,6 +69,7 @@ static inline void ablkcipher_queue_write(struct ablkcipher_walk *walk,
69static inline u8 *ablkcipher_get_spot(u8 *start, unsigned int len) 69static inline u8 *ablkcipher_get_spot(u8 *start, unsigned int len)
70{ 70{
71 u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK); 71 u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
72
72 return max(start, end_page); 73 return max(start, end_page);
73} 74}
74 75
@@ -86,7 +87,8 @@ static inline unsigned int ablkcipher_done_slow(struct ablkcipher_walk *walk,
86 if (n == len_this_page) 87 if (n == len_this_page)
87 break; 88 break;
88 n -= len_this_page; 89 n -= len_this_page;
89 scatterwalk_start(&walk->out, scatterwalk_sg_next(walk->out.sg)); 90 scatterwalk_start(&walk->out, scatterwalk_sg_next(
91 walk->out.sg));
90 } 92 }
91 93
92 return bsize; 94 return bsize;
@@ -284,6 +286,7 @@ static int ablkcipher_walk_first(struct ablkcipher_request *req,
284 walk->iv = req->info; 286 walk->iv = req->info;
285 if (unlikely(((unsigned long)walk->iv & alignmask))) { 287 if (unlikely(((unsigned long)walk->iv & alignmask))) {
286 int err = ablkcipher_copy_iv(walk, tfm, alignmask); 288 int err = ablkcipher_copy_iv(walk, tfm, alignmask);
289
287 if (err) 290 if (err)
288 return err; 291 return err;
289 } 292 }
@@ -589,7 +592,8 @@ static int crypto_givcipher_default(struct crypto_alg *alg, u32 type, u32 mask)
589 if (IS_ERR(inst)) 592 if (IS_ERR(inst))
590 goto put_tmpl; 593 goto put_tmpl;
591 594
592 if ((err = crypto_register_instance(tmpl, inst))) { 595 err = crypto_register_instance(tmpl, inst);
596 if (err) {
593 tmpl->free(inst); 597 tmpl->free(inst);
594 goto put_tmpl; 598 goto put_tmpl;
595 } 599 }