Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2462010yba; Sun, 28 Apr 2019 01:17:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJjSvUwPYK2m/DtqBpQziivmfPslNzfy4Jj60Rdv8skYzel9Xg7bQdRMbAzs6tjUS4PU6R X-Received: by 2002:a63:1c6:: with SMTP id 189mr51107946pgb.22.1556439436128; Sun, 28 Apr 2019 01:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556439436; cv=none; d=google.com; s=arc-20160816; b=Ib0CMOKTf/eo/tKOQHKeUFF0i0Cvk/oKd5hFQGO6u9A2+PAg+2X8So2psu0k5emcgu YimzKycEptt/+w1Js3UqLrf2wV/n/OUFGchrGS85LlBGcE6VxeruofIWbWzbqAhligiU iFxoMGDVNEcvAM1X2Lk0jPVfLl4P3aflcDqLDtK1bPmhxh60HOpf+byuvW7olDer0tdF kDzmVHW0FVvCv5L66japBEDS/z84/jGL12A5AGJEmFKlmra8xmSMRye2uDA8oOnTsTQ8 OpuAwIeLdB6Z5Q7wcCC67gMggIEJbaZJk1OBTbBYBcQtf8O+vfZSmm5tVbfardyLmTlu K+kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=zu9qv0+MfcQNW1QeSQunpw22JQVGmWc5a//o0A/MIPE=; b=zxRxNJThDgil3xZ7zzIDhGqDarJbNaReBZZ7awixHtEcuFYacSP47EoDQRJaFZOMin XaPg7G+Zy33On36gG/nw9+NJL6c5PzYowlojDfFApevzt9fBXBBF1w5vl9QIHnW1EsYS R0zXVErhgMbdCRUQu93KjK7Z4ez7OFkgrcIT2YQQ7jboPPeo8OQIZm5gIZDsxI+zN/Ug 9syasLCZoO31PCvxhla7ZVB4Rk9s7QsY8ZoDD8MPorfFPmKzI9RGGCFa7wrVnWGzDEsB FeJEKh61eAGqN/RC5eTMfU+GpDJzr1waESeIgf7n4FnyD8zqKI5o2Ai+ZqBj1DyfSNwJ OR6w== 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 t9si29594006plo.98.2019.04.28.01.16.59; Sun, 28 Apr 2019 01:17:16 -0700 (PDT) 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 S1726530AbfD1IQU (ORCPT + 99 others); Sun, 28 Apr 2019 04:16:20 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44898 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726369AbfD1IQU (ORCPT ); Sun, 28 Apr 2019 04:16:20 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 26C2E8F0C0F182CB1608; Sun, 28 Apr 2019 16:16:17 +0800 (CST) Received: from [127.0.0.1] (10.177.31.96) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Sun, 28 Apr 2019 16:16:02 +0800 Subject: Re: [PATCH -next] crypto: ccree - remove set but not used variable 'du_size' To: Gilad Ben-Yossef References: <20190426151821.36944-1-yuehaibing@huawei.com> CC: Herbert Xu , Linux kernel mailing list , Linux Crypto Mailing List , David Miller From: YueHaibing Message-ID: <7ecc05f9-952f-e036-7d85-6c651bf2a888@huawei.com> Date: Sun, 28 Apr 2019 16:16:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2019/4/28 15:58, Gilad Ben-Yossef wrote: > On Fri, Apr 26, 2019 at 7:38 PM Yue Haibing wrote: >> >> From: YueHaibing >> >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> drivers/crypto/ccree/cc_cipher.c: In function cc_setup_key_desc: >> drivers/crypto/ccree/cc_cipher.c:645:15: warning: variable du_size set but not used [-Wunused-but-set-variable] >> >> It is never used since introduction in >> commit dd8486c75085 ("crypto: ccree - move key load desc. before flow desc.") >> >> Signed-off-by: YueHaibing >> --- >> drivers/crypto/ccree/cc_cipher.c | 4 ---- >> 1 file changed, 4 deletions(-) >> >> diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c >> index d9f8cd5..6bd3791 100644 >> --- a/drivers/crypto/ccree/cc_cipher.c >> +++ b/drivers/crypto/ccree/cc_cipher.c >> @@ -642,16 +642,12 @@ static void cc_setup_key_desc(struct crypto_tfm *tfm, >> int direction = req_ctx->gen_ctx.op_type; >> dma_addr_t key_dma_addr = ctx_p->user.key_dma_addr; >> unsigned int key_len = ctx_p->keylen; >> - unsigned int du_size = nbytes; >> unsigned int din_size; >> >> struct cc_crypto_alg *cc_alg = >> container_of(tfm->__crt_alg, struct cc_crypto_alg, >> skcipher_alg.base); >> >> - if (cc_alg->data_unit) >> - du_size = cc_alg->data_unit; > > Thanks! > This is a good catch. It seems we can also drop the whole cc_alg var > as well in this case, > since it is only used by the code setting du_size.... > > Do you want to send a patch doing both or shall I ? Yes, will send v2, thanks! > > Cheers, > Gilad >