Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp915215imm; Wed, 1 Aug 2018 07:21:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4ygozOnUMDRhHHA3gQ4YKxyUzDyS3iulYmM1OebTbz57RAhQbXtQVtqiqlNwPkARMCDHH X-Received: by 2002:a17:902:8f93:: with SMTP id z19-v6mr24466333plo.241.1533133273989; Wed, 01 Aug 2018 07:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533133273; cv=none; d=google.com; s=arc-20160816; b=uIiwcH9ZdTEoAbBJqTz6WA29yHz/kMcgVPOfaC8nTUAXSN4PJalEqUz+drDcUL7ds8 BCqKVY7yDbvN/Fq3ik1HYkbZfJTElclaxVQjcVRs3ffPWUU/Fd1YC33AYNL/geYlqmMw mgz9AZwHT3K/viMxFFDVvNotIsOIZ8EZvGygdmjZXD43aE08mAkIo0cVzhy9bTR2FkXC tZhVmJJe3kSZ1qCMKkCxiXKVF46wZkEFF1DZdwqgiJt5lAQGhRsPWpfKLXJpAZqCr6L+ epy4AtvtHQB4zyiAgXTbDwkQGrRd+Hl5NrUJ2LVMfbuYjdTgkhnN94DQAGTqiowvzz0J z9UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=PEQdHjFcA27okcBKBCnXW2bjSsCpF+Bcx9ydfMGvZMk=; b=WGdWYCh18L5+RYXHl+6DvbIVDkj7T/E8Evo0FqaW190yKFXPAlZZwz5Cg8SfKBa9oy 0it4+T2BoNKb3PcM/Ns5XwJN9wz7OlyEql8hsLVs+O5OueamgaFlYdyOHZdHMAjMFMY+ hOKNENnWqSJnUCBuQM1PraM1T+EcGIYu6f/NLnWP4KcUEtXIxoz7d/4/Q1xFSG9d1ish 5973frvbeA6b1mKna5ApRZ51GFYb9OvhjcGH6pCQU4xoP+0YFSSTUMAsWoRqa8m46BDV 9ASjpJZYYoXV7joUo6aQeDxGcg02PBQjpwd+5PZUTo2i+JvDMZCFqUKs6Q2UBVt/393o HM1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b18-v6si15058816pgd.185.2018.08.01.07.20.59; Wed, 01 Aug 2018 07:21:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389583AbeHAQGG (ORCPT + 99 others); Wed, 1 Aug 2018 12:06:06 -0400 Received: from fieldses.org ([173.255.197.46]:33880 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389547AbeHAQGG (ORCPT ); Wed, 1 Aug 2018 12:06:06 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 2869A1EF5; Wed, 1 Aug 2018 10:20:07 -0400 (EDT) Date: Wed, 1 Aug 2018 10:20:07 -0400 From: Bruce Fields To: Chuck Lever Cc: YueHaibing , davem@davemloft.net, trond.myklebust@hammerspace.com, Anna Schumaker , jlayton@kernel.org, ebiggers@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Linux NFS Mailing List Subject: Re: [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data' Message-ID: <20180801142007.GE16651@fieldses.org> References: <20180801062810.19752-1-yuehaibing@huawei.com> <9BA49886-5754-480E-BBB3-CC76E5A2C3B7@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9BA49886-5754-480E-BBB3-CC76E5A2C3B7@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 10:15:29AM -0400, Chuck Lever wrote: > > > > On Aug 1, 2018, at 2:28 AM, YueHaibing wrote: > > > > Variables 'checksumlen','blocksize' and 'data' are being assigned, > > but are never used,hence they are redundant and can be removed. > > > > fix fllowing warning: > > ^fllowing^following > > For the svc_rdma.c part: > > Reviewed-by: Chuck Lever Thanks.--b. > > > > net/sunrpc/auth_gss/gss_krb5_wrap.c:443:7: warning: variable ‘blocksize’ set but not used [-Wunused-but-set-variable] > > net/sunrpc/auth_gss/gss_krb5_crypto.c:376:15: warning: variable ‘checksumlen’ set but not used [-Wunused-but-set-variable] > > net/sunrpc/xprtrdma/svc_rdma.c:97:9: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] > > > > Signed-off-by: YueHaibing > > --- > > net/sunrpc/auth_gss/gss_krb5_crypto.c | 2 -- > > net/sunrpc/auth_gss/gss_krb5_wrap.c | 2 -- > > net/sunrpc/xprtrdma/svc_rdma.c | 2 -- > > 3 files changed, 6 deletions(-) > > > > diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c > > index 8654494..84a16fd 100644 > > --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c > > +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c > > @@ -373,7 +373,6 @@ make_checksum_v2(struct krb5_ctx *kctx, char *header, int hdrlen, > > struct scatterlist sg[1]; > > int err = -1; > > u8 *checksumdata; > > - unsigned int checksumlen; > > > > if (kctx->gk5e->keyed_cksum == 0) { > > dprintk("%s: expected keyed hash for %s\n", > > @@ -393,7 +392,6 @@ make_checksum_v2(struct krb5_ctx *kctx, char *header, int hdrlen, > > tfm = crypto_alloc_ahash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); > > if (IS_ERR(tfm)) > > goto out_free_cksum; > > - checksumlen = crypto_ahash_digestsize(tfm); > > > > req = ahash_request_alloc(tfm, GFP_NOFS); > > if (!req) > > diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c > > index a737c2d..9a1347f 100644 > > --- a/net/sunrpc/auth_gss/gss_krb5_wrap.c > > +++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c > > @@ -440,7 +440,6 @@ static u32 > > gss_wrap_kerberos_v2(struct krb5_ctx *kctx, u32 offset, > > struct xdr_buf *buf, struct page **pages) > > { > > - int blocksize; > > u8 *ptr, *plainhdr; > > s32 now; > > u8 flags = 0x00; > > @@ -473,7 +472,6 @@ gss_wrap_kerberos_v2(struct krb5_ctx *kctx, u32 offset, > > *ptr++ = 0xff; > > be16ptr = (__be16 *)ptr; > > > > - blocksize = crypto_skcipher_blocksize(kctx->acceptor_enc); > > *be16ptr++ = 0; > > /* "inner" token header always uses 0 for RRC */ > > *be16ptr++ = 0; > > diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c > > index 357ba90..134bef6a 100644 > > --- a/net/sunrpc/xprtrdma/svc_rdma.c > > +++ b/net/sunrpc/xprtrdma/svc_rdma.c > > @@ -94,7 +94,6 @@ static int read_reset_stat(struct ctl_table *table, int write, > > atomic_set(stat, 0); > > else { > > char str_buf[32]; > > - char *data; > > int len = snprintf(str_buf, 32, "%d\n", atomic_read(stat)); > > if (len >= 32) > > return -EFAULT; > > @@ -103,7 +102,6 @@ static int read_reset_stat(struct ctl_table *table, int write, > > *lenp = 0; > > return 0; > > } > > - data = &str_buf[*ppos]; > > len -= *ppos; > > if (len > *lenp) > > len = *lenp; > > -- > > 2.7.0 > > > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > Chuck Lever > >