Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2450531yba; Sun, 28 Apr 2019 01:00:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq8zTrjjbQPaaAdZxKXdhEdZnAo4Zu1Z4oqxL6wxV2YiPq+iUTpAurs8HOB4YWBArD/BeU X-Received: by 2002:a62:6e05:: with SMTP id j5mr56793108pfc.5.1556438427358; Sun, 28 Apr 2019 01:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556438427; cv=none; d=google.com; s=arc-20160816; b=YVjFDb1qh8XsJnE8/8B/Nq+TDJjXUkslM9YaPxpEATycviGMEKdE3uNpC/ndzpsrCL wsUzWLO+sn3xVHaIMGtyacMiWMnD5RUJA6yokUbyw3C0/heutyhrb7iVn0BLAmiq/VgX W9nVPkzmKqve5bXCFU2pOQqRTJtnffuIJBULG43tWsMydGvSh6CQOLhcIkzBnmLfXNQn XiGd0pwqJtoP1zH4EfvqmGWUWSB4HjuHBWBN5zSGl6UBIZAPDMfQ0rBNQDCqmvoZz8rQ kimRG01bWpTT8nTyvfvlvlnoHj57UEI3Tbe3LpgTJUFyZtvPJ9kr4jhu4y7y3uaW2BkG LFWQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=yadCq+3TFtjJOWElejuaUSgw6RJEnKLjvwR5ZDLWJ3E=; b=w6UISiMh2r10HG1Z3GCV9LTBVH68qQUq5nwDNpoMW4Xt/wCdIg3yEPnHZ/tx18PLof 5rvP4oxHt++ZoKJe4XnjqA5rsjgcUD+gAKXbzfzkUWjLFRJPrdP2UMGu+lUNhJoGscJq cZINIsveNpp37vqMCuYivNOBMzhLOmYjPCML7R/kmcATaceRzNj8LqRnEy/jXHt52j58 xIyoeXFOR7Re7hhEh+11RAgfFS4sEguoTXhBS2OV8qu5nTnxXVGmxsvYqKIS3GLj/n3j +9njeT0kWfFgRVSCgbDu1uBGM4JvVs2o/uGh7Fd1uuFb+RzJ+f1S/RXGu+PBbDqFcY7W awOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=duA59wo5; 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 f2si29022314pgc.182.2019.04.28.01.00.12; Sun, 28 Apr 2019 01:00:27 -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; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=duA59wo5; 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 S1726566AbfD1H64 (ORCPT + 99 others); Sun, 28 Apr 2019 03:58:56 -0400 Received: from mail-vk1-f194.google.com ([209.85.221.194]:44994 "EHLO mail-vk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbfD1H6z (ORCPT ); Sun, 28 Apr 2019 03:58:55 -0400 Received: by mail-vk1-f194.google.com with SMTP id q189so1658059vkq.11 for ; Sun, 28 Apr 2019 00:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benyossef-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=yadCq+3TFtjJOWElejuaUSgw6RJEnKLjvwR5ZDLWJ3E=; b=duA59wo5lnfQDeEFZYdACgMLLfO4I0sGb/82yCn57UdR51AXVJ92nw62UKMYtLIG2H 6BS7UYy+R3DUo6YMZjIYB/63h6Bpxpf8Nf7LIZkdDfOxgjdNCl1R0RQYsrQZq39FRz9S w//4imMTO+iySHATUxg/goM4kz7hfmQJ2qqBH6H4z1AWYDu2j2bPSn6Zz2VQuNY297EB D17csPJuiy9WUmRFf504gmFclTW1Rd6AGj7JaN5lqYoWktnE68pFCIlOzrKaqGXDAC/2 otD1OtkJoGiVGvWyNtshbRwUh30W8gLXEP6hj06SZpJ0Sv742Sr85e9GItedNOIP/6vC dzOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yadCq+3TFtjJOWElejuaUSgw6RJEnKLjvwR5ZDLWJ3E=; b=kLpUfWIp4dytjA4V2Ac08LwI4lH+DMGEStqVVx6KvZ/xPvbc3+cVvoC1egUhlOouBw nfiG9WgsFKzsWhLdwxDAZu3U9PZ/l5pELs8cz2jyh+0vp+dM2q7Ss/RY6h0UwUdK2bUf vrxKWzymxpoZTCRgFYVHYPsSEkJk2djcFWdVNLZKJSMeoL0alzspj9sQzagBQudsn5uh QKgaKRpxxgbL2MvD7vz/ZpwL53lkQd7oCpWOgd4rICQAOQFxxjczhdLPjwoCavZoulkS IBgG60OaA1pYisO2ze3K80BUe861D8dEVF4MOxkE+01AfC5JgHPFyW+oakx4TP3BHKi1 VOiQ== X-Gm-Message-State: APjAAAWyld7uPNHn8H2dkWAMnJ6uqP0heIf1NV4x7uYjkm6Yq04Y6BHQ kPdtyL7KuDRNRo3DEJniSjS+t4TqSS9RuONYhz+xlw== X-Received: by 2002:a1f:97ce:: with SMTP id z197mr29161293vkd.58.1556438334562; Sun, 28 Apr 2019 00:58:54 -0700 (PDT) MIME-Version: 1.0 References: <20190426151821.36944-1-yuehaibing@huawei.com> In-Reply-To: <20190426151821.36944-1-yuehaibing@huawei.com> From: Gilad Ben-Yossef Date: Sun, 28 Apr 2019 10:58:43 +0300 Message-ID: Subject: Re: [PATCH -next] crypto: ccree - remove set but not used variable 'du_size' To: Yue Haibing Cc: Herbert Xu , Linux kernel mailing list , Linux Crypto Mailing List , David Miller Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 bu= t not used [-Wunused-but-set-variable] > > It is never used since introduction in > commit dd8486c75085 ("crypto: ccree - move key load desc. before flow des= c.") > > 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_c= ipher.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 *tf= m, > int direction =3D req_ctx->gen_ctx.op_type; > dma_addr_t key_dma_addr =3D ctx_p->user.key_dma_addr; > unsigned int key_len =3D ctx_p->keylen; > - unsigned int du_size =3D nbytes; > unsigned int din_size; > > struct cc_crypto_alg *cc_alg =3D > container_of(tfm->__crt_alg, struct cc_crypto_alg, > skcipher_alg.base); > > - if (cc_alg->data_unit) > - du_size =3D 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 ? Cheers, Gilad --=20 Gilad Ben-Yossef Chief Coffee Drinker values of =CE=B2 will give rise to dom!