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: 10175497 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E62FC601E7 for ; Fri, 19 Jan 2018 14:59:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6A0C2869D for ; Fri, 19 Jan 2018 14:59:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA7A2286AD; Fri, 19 Jan 2018 14:59:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA5F62869D for ; Fri, 19 Jan 2018 14:59:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754855AbeASO7V (ORCPT ); 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 +0100 Message-Id: <20180119145853.1221026-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:R+wUcFfeg3+Xev5V1diRoiS6iETk99yWo/XcDg9KQNtpKOb8v7i BC0WFTDp3Cugg4UtY2diliMygTnWr/V4q5ITiYS7tsZYhin1F5C01v7W/aM1UI4+hDMSCvB OUMDKV1k2hV3PsfeFRQd8BHD9wu63qcGCOQ/IcQUq8W1dkOHzK3JB+eILgZWZOYgm4klIqS GDyUTcH55327GVpLWw39A== X-UI-Out-Filterresults: notjunk:1; V01:K0:uVY4ZV9rk6A=:lB0K+aIUGibBpdi1j4mF+b c+JWGe63Tb/7TOla1i6dDVSR4qKXJyuVLDIR2ElFqHP0RAiJjzUOqQyLXDS3ctihoCMrIf6by WwV3+YcI8rImEi+a0Pj1c6uHbsbQ3C6AwJF0l1CTUUD5PxAlbbSh1EtVmYORQH1mGh6bDCrJ5 QSNz4D5o2s5ecEX6pOxYpPmvLsI2QDz20Kcfkc5rt4q1yXNqeUTTJnJKSDu1G9MqkrfN7TVOu d99YjhmCKQbFIglkeE3KPhWwQqIRycXBXGCB9GNx6+NtTOdKRUxMGgog+4yYUOeIGToOX5/BK 7CXJQZx7y7eSXHodiTxI23GEi1F6QKnVCqhjYZz40iuGqIRWcWahBKvEN9rq4CJGJvZmsujOZ tnuGCItCNAa4n6L2CWZKoRGBvotkCD1yRUS/hZP3hhs2AmEXIjvSUTW/nN8zyvTr2eMh/Nxh4 e8EyqvEOIt9tD7rOM2V6/qGK7LnB6txXGycoBCnXd2f7ubTX/rZ2QpuRO0lpBcy1T1FQ1TNBs CRxuGrqbSJxbXfG72fEQWL1zsNValm0s1DxLBOGEQeu/5Ag1+8w4Hm/MdLwHrjRgIHt5FXFGh XORmh9WsTnA9VVuFst2CDOkEsJk+Qyl3OYgrAx+I9xfunUFYnogNreOA0dBGvOYc5faZiXFXV E0WWnJUzt+ObTpDMQDkwzrLDxuOf5+ZJoIvr/D8oEMEyw5MjvuzpAiUtUHkYNIDT9+UVwKUjx MWWA0c+TuQN5lb6X0juuQPazd0jCBNymkP+iqg== Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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)