From patchwork Fri Jan 19 14:58:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 125174 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp328433ljf; Fri, 19 Jan 2018 06:59:22 -0800 (PST) X-Google-Smtp-Source: ACJfBotIM8bt6jJEOYDgVTew/dbTBUDOyT1HTsHl0xf+mACZLN549C70ZtkHQ7ts2No6v1N8HDQ4 X-Received: by 10.99.96.210 with SMTP id u201mr40217254pgb.248.1516373962313; Fri, 19 Jan 2018 06:59:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516373962; cv=none; d=google.com; s=arc-20160816; b=n55dtBvaVdThSRY9HvnGMoLLhz+7h2f3gzjIqYhphQFOD8NByrbOwPGv5nz7Mj+/MJ bCbLgDjExpvOFvWHGBM6YP5mh8n0+gyHVjohnQKShRfFM27CLlpRUEUNicVTbccvhomZ TPhs9DfQAp8qlD0PxR4YEIaV7i6YI7ndzGmBtJicsi770MZ4BO4K5naF7g4Uuu7BzWKl ieVMiFa1iUuz9O8J2lj+Te9j84B2Uw96vpWotBUuT64dtqDGcwS88/hSGHt02TfH1pKL SdHA4kWG6fNZHPdhmttiIrf0BZWfX86JDGeKm7Ph3a8UbdIeIxE/oKIeFtt1szKTCNxJ KZJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=JCblBgdW5ZXEjue9N07UsWX5R3N2BIwiG05zr6HHk20=; b=PWwsuETVQCOcHYxpP9Ir7hsQM9kdB1Zze4uMcZQYDxgV6drITVGfCwRl662xnGeSgc vhnEWlJI8m2qEkRdc/nTiM/cgF7L6KnfsqLMAU7+S2kl1Y/7CUVAKUpsK/DROvPVgLKm Gij+giR+6MWQPER1JKW7+My4UEHZvWwPppNSuE+NuA9e6AwU4J6r7ni2QAyCfX4f4SS8 cg5M6NyNG0ZvxYmyhazogXrwQib+ppTXJCW6RxA0iAPQgvEQvpChiKMJU28INv5J2Du6 SqeVrjaueX0rcuTng5n0+wN8t6Q5V4vCjLPUQLuVabdbR13yrebCuVj13RuLikQWTitX 0Dlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si9441325pfa.273.2018.01.19.06.59.22; Fri, 19 Jan 2018 06:59:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754855AbeASO7V (ORCPT + 1 other); Fri, 19 Jan 2018 09:59:21 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:60137 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754104AbeASO7U (ORCPT ); Fri, 19 Jan 2018 09:59:20 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MW7OX-1eJ9ac3CtF-00XICQ; Fri, 19 Jan 2018 15:58:59 +0100 From: Arnd Bergmann To: Harsh Jain , Herbert Xu , "David S. Miller" Cc: Arnd Bergmann , Atul Gupta , Ganesh Goudar , Colin Ian King , Yeshaswi M R Gowda , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: chelsio - fix code indentation warning Date: Fri, 19 Jan 2018 15:58:47 +0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iUtUHkYNIDT9+UVwKUjx MWWA0c+TuQN5lb6X0juuQPazd0jCBNymkP+iqg== Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 --- drivers/crypto/chelsio/chcr_algo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 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)