linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: chelsio - fix code indentation warning
@ 2018-01-19 14:58 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2018-01-19 14:58 UTC (permalink / raw)
  To: Harsh Jain, Herbert Xu, David S. Miller
  Cc: Arnd Bergmann, Atul Gupta, Ganesh Goudar, Colin Ian King,
	Yeshaswi M R Gowda, linux-crypto, linux-kernel

gcc noticed some unusual and confusing indentation:

drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr':
drivers/crypto/chelsio/chcr_algo.c:2113:2: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
  if (error)
  ^~
drivers/crypto/chelsio/chcr_algo.c:2115:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0);

The patch that changed it reindented one function with the same code
but not this one, so let's do the same here.

Fixes: e1a018e607a3 ("crypto: chelsio - Remove dst sg size zero check")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/crypto/chelsio/chcr_algo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c
index a9c894bf9c01..4b138c41bdfb 100644
--- a/drivers/crypto/chelsio/chcr_algo.c
+++ b/drivers/crypto/chelsio/chcr_algo.c
@@ -2112,11 +2112,11 @@ static struct sk_buff *create_authenc_wr(struct aead_request *req,
 	error = chcr_aead_common_init(req, op_type);
 	if (error)
 		return ERR_PTR(error);
-		dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0);
-		dnents += sg_nents_xlen(req->dst, req->cryptlen +
+	dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0);
+	dnents += sg_nents_xlen(req->dst, req->cryptlen +
 			(op_type ? -authsize : authsize), CHCR_DST_SG_SIZE,
 			req->assoclen);
-		dnents += MIN_AUTH_SG; // For IV
+	dnents += MIN_AUTH_SG; // For IV
 
 	dst_size = get_space_for_phys_dsgl(dnents);
 	kctx_len = (ntohl(KEY_CONTEXT_CTX_LEN_V(aeadctx->key_ctx_hdr)) << 4)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-19 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19 14:58 [PATCH] crypto: chelsio - fix code indentation warning Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).