Commit a861afbc authored by Joshua I. James's avatar Joshua I. James Committed by Herbert Xu

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: default avatarJoshua I. James <joshua@cybercrimetech.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent be95f0fa
...@@ -69,6 +69,7 @@ static inline void ablkcipher_queue_write(struct ablkcipher_walk *walk, ...@@ -69,6 +69,7 @@ static inline void ablkcipher_queue_write(struct ablkcipher_walk *walk,
static inline u8 *ablkcipher_get_spot(u8 *start, unsigned int len) static inline u8 *ablkcipher_get_spot(u8 *start, unsigned int len)
{ {
u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK); u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
return max(start, end_page); return max(start, end_page);
} }
...@@ -86,7 +87,8 @@ static inline unsigned int ablkcipher_done_slow(struct ablkcipher_walk *walk, ...@@ -86,7 +87,8 @@ static inline unsigned int ablkcipher_done_slow(struct ablkcipher_walk *walk,
if (n == len_this_page) if (n == len_this_page)
break; break;
n -= len_this_page; n -= len_this_page;
scatterwalk_start(&walk->out, scatterwalk_sg_next(walk->out.sg)); scatterwalk_start(&walk->out, scatterwalk_sg_next(
walk->out.sg));
} }
return bsize; return bsize;
...@@ -284,6 +286,7 @@ static int ablkcipher_walk_first(struct ablkcipher_request *req, ...@@ -284,6 +286,7 @@ static int ablkcipher_walk_first(struct ablkcipher_request *req,
walk->iv = req->info; walk->iv = req->info;
if (unlikely(((unsigned long)walk->iv & alignmask))) { if (unlikely(((unsigned long)walk->iv & alignmask))) {
int err = ablkcipher_copy_iv(walk, tfm, alignmask); int err = ablkcipher_copy_iv(walk, tfm, alignmask);
if (err) if (err)
return err; return err;
} }
...@@ -589,7 +592,8 @@ static int crypto_givcipher_default(struct crypto_alg *alg, u32 type, u32 mask) ...@@ -589,7 +592,8 @@ static int crypto_givcipher_default(struct crypto_alg *alg, u32 type, u32 mask)
if (IS_ERR(inst)) if (IS_ERR(inst))
goto put_tmpl; goto put_tmpl;
if ((err = crypto_register_instance(tmpl, inst))) { err = crypto_register_instance(tmpl, inst);
if (err) {
tmpl->free(inst); tmpl->free(inst);
goto put_tmpl; goto put_tmpl;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment