All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data'
@ 2018-08-01  6:28 YueHaibing
  2018-08-01 13:00 ` J. Bruce Fields
  2018-08-01 14:15   ` Chuck Lever
  0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2018-08-01  6:28 UTC (permalink / raw)
  To: davem, trond.myklebust, anna.schumaker, bfields, jlayton,
	ebiggers, chuck.lever
  Cc: linux-kernel, netdev, linux-nfs, YueHaibing

Variables 'checksumlen','blocksize' and 'data' are being assigned,
but are never used,hence they are redundant and can be removed.

fix fllowing warning:

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 <yuehaibing@huawei.com>
---
 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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data'
  2018-08-01  6:28 [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data' YueHaibing
@ 2018-08-01 13:00 ` J. Bruce Fields
  2018-08-01 14:15   ` Chuck Lever
  1 sibling, 0 replies; 5+ messages in thread
From: J. Bruce Fields @ 2018-08-01 13:00 UTC (permalink / raw)
  To: YueHaibing
  Cc: davem, trond.myklebust, anna.schumaker, jlayton, ebiggers,
	chuck.lever, linux-kernel, netdev, linux-nfs

Thanks, applying (assuming Chuck's got no objection to the svc_rdma
part).

--b.

On Wed, Aug 01, 2018 at 02:28:10PM +0800, 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:
> 
> 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 <yuehaibing@huawei.com>
> ---
>  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
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data'
  2018-08-01  6:28 [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data' YueHaibing
@ 2018-08-01 14:15   ` Chuck Lever
  2018-08-01 14:15   ` Chuck Lever
  1 sibling, 0 replies; 5+ messages in thread
From: Chuck Lever @ 2018-08-01 14:15 UTC (permalink / raw)
  To: YueHaibing
  Cc: davem, trond.myklebust, Anna Schumaker, Bruce Fields, jlayton,
	ebiggers, linux-kernel, netdev, Linux NFS Mailing List



> On Aug 1, 2018, at 2:28 AM, YueHaibing <yuehaibing@huawei.com> 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 <chuck.lever@oracle.com>


> 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 <yuehaibing@huawei.com>
> ---
> 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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data'
@ 2018-08-01 14:15   ` Chuck Lever
  0 siblings, 0 replies; 5+ messages in thread
From: Chuck Lever @ 2018-08-01 14:15 UTC (permalink / raw)
  To: YueHaibing
  Cc: davem, trond.myklebust, Anna Schumaker, Bruce Fields, jlayton,
	ebiggers, linux-kernel, netdev, Linux NFS Mailing List



> On Aug 1, 2018, at 2:28 AM, YueHaibing <yuehaibing@huawei.com> wrote:
>=20
> Variables 'checksumlen','blocksize' and 'data' are being assigned,
> but are never used,hence they are redundant and can be removed.
>=20
> fix fllowing warning:

^fllowing^following

For the svc_rdma.c part:

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>


> net/sunrpc/auth_gss/gss_krb5_wrap.c:443:7: warning: variable =
=E2=80=98blocksize=E2=80=99 set but not used [-Wunused-but-set-variable]
> net/sunrpc/auth_gss/gss_krb5_crypto.c:376:15: warning: variable =
=E2=80=98checksumlen=E2=80=99 set but not used =
[-Wunused-but-set-variable]
> net/sunrpc/xprtrdma/svc_rdma.c:97:9: warning: variable =E2=80=98data=E2=80=
=99 set but not used [-Wunused-but-set-variable]
>=20
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> 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(-)
>=20
> 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 =3D -1;
> 	u8 *checksumdata;
> -	unsigned int checksumlen;
>=20
> 	if (kctx->gk5e->keyed_cksum =3D=3D 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 =3D crypto_alloc_ahash(kctx->gk5e->cksum_name, 0, =
CRYPTO_ALG_ASYNC);
> 	if (IS_ERR(tfm))
> 		goto out_free_cksum;
> -	checksumlen =3D crypto_ahash_digestsize(tfm);
>=20
> 	req =3D 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 =3D 0x00;
> @@ -473,7 +472,6 @@ gss_wrap_kerberos_v2(struct krb5_ctx *kctx, u32 =
offset,
> 	*ptr++ =3D 0xff;
> 	be16ptr =3D (__be16 *)ptr;
>=20
> -	blocksize =3D crypto_skcipher_blocksize(kctx->acceptor_enc);
> 	*be16ptr++ =3D 0;
> 	/* "inner" token header always uses 0 for RRC */
> 	*be16ptr++ =3D 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 =3D snprintf(str_buf, 32, "%d\n", =
atomic_read(stat));
> 		if (len >=3D 32)
> 			return -EFAULT;
> @@ -103,7 +102,6 @@ static int read_reset_stat(struct ctl_table =
*table, int write,
> 			*lenp =3D 0;
> 			return 0;
> 		}
> -		data =3D &str_buf[*ppos];
> 		len -=3D *ppos;
> 		if (len > *lenp)
> 			len =3D *lenp;
> --=20
> 2.7.0
>=20
>=20
> --
> 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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data'
  2018-08-01 14:15   ` Chuck Lever
  (?)
@ 2018-08-01 14:20   ` Bruce Fields
  -1 siblings, 0 replies; 5+ messages in thread
From: Bruce Fields @ 2018-08-01 14:20 UTC (permalink / raw)
  To: Chuck Lever
  Cc: YueHaibing, davem, trond.myklebust, Anna Schumaker, jlayton,
	ebiggers, linux-kernel, netdev, Linux NFS Mailing List

On Wed, Aug 01, 2018 at 10:15:29AM -0400, Chuck Lever wrote:
> 
> 
> > On Aug 1, 2018, at 2:28 AM, YueHaibing <yuehaibing@huawei.com> 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 <chuck.lever@oracle.com>

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 <yuehaibing@huawei.com>
> > ---
> > 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
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-01 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01  6:28 [PATCH] sunrpc: remove redundant variables 'checksumlen','blocksize' and 'data' YueHaibing
2018-08-01 13:00 ` J. Bruce Fields
2018-08-01 14:15 ` Chuck Lever
2018-08-01 14:15   ` Chuck Lever
2018-08-01 14:20   ` Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.