All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c
@ 2020-08-12 14:12 Alex Dewar
  2020-08-12 14:12 ` [PATCH 2/2] nfsd: Fix typo in comment Alex Dewar
  2020-08-12 20:36 ` [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Frank van der Linden
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Dewar @ 2020-08-12 14:12 UTC (permalink / raw)
  To: J. Bruce Fields, Chuck Lever, linux-nfs, linux-kernel; +Cc: Alex Dewar

In nfsd4_encode_listxattrs(), the variable p is assigned to at one point
but this value is never used before p is reassigned. Fix this.

Addresses-Coverity: ("Unused value")
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
---
 fs/nfsd/nfs4xdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 259d5ad0e3f47..1a0341fd80f9a 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
 			goto out;
 		}
 
-		p = xdr_encode_opaque(p, sp, slen);
+		xdr_encode_opaque(p, sp, slen);
 
 		xdrleft -= xdrlen;
 		count++;
-- 
2.28.0


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

* [PATCH 2/2] nfsd: Fix typo in comment
  2020-08-12 14:12 [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Alex Dewar
@ 2020-08-12 14:12 ` Alex Dewar
  2020-08-12 20:37   ` Frank van der Linden
  2020-08-12 20:36 ` [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Frank van der Linden
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Dewar @ 2020-08-12 14:12 UTC (permalink / raw)
  To: J. Bruce Fields, Chuck Lever, linux-nfs, linux-kernel; +Cc: Alex Dewar

Fix typos in nfs4xdr.c.

Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
---
 fs/nfsd/nfs4xdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 1a0341fd80f9a..3db789139a71f 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -4828,7 +4828,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
 		slen = strlen(sp);
 
 		/*
-		 * Check if this a user. attribute, skip it if not.
+		 * Check if this is a user attribute, skip it if not.
 		 */
 		if (strncmp(sp, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN))
 			goto contloop;
-- 
2.28.0


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

* Re: [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c
  2020-08-12 14:12 [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Alex Dewar
  2020-08-12 14:12 ` [PATCH 2/2] nfsd: Fix typo in comment Alex Dewar
@ 2020-08-12 20:36 ` Frank van der Linden
  2020-08-13 19:01   ` Chuck Lever
  2020-08-20 23:37   ` Alex Dewar
  1 sibling, 2 replies; 7+ messages in thread
From: Frank van der Linden @ 2020-08-12 20:36 UTC (permalink / raw)
  To: Alex Dewar; +Cc: J. Bruce Fields, Chuck Lever, linux-nfs, linux-kernel

On Wed, Aug 12, 2020 at 03:12:51PM +0100, Alex Dewar wrote:
> 
> In nfsd4_encode_listxattrs(), the variable p is assigned to at one point
> but this value is never used before p is reassigned. Fix this.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
> ---
>  fs/nfsd/nfs4xdr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 259d5ad0e3f47..1a0341fd80f9a 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
>                         goto out;
>                 }
> 
> -               p = xdr_encode_opaque(p, sp, slen);
> +               xdr_encode_opaque(p, sp, slen);
> 
>                 xdrleft -= xdrlen;
>                 count++;
> --
> 2.28.0
> 

Yep, I guess my linting missed that, thanks for the fix.

- Frank

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

* Re: [PATCH 2/2] nfsd: Fix typo in comment
  2020-08-12 14:12 ` [PATCH 2/2] nfsd: Fix typo in comment Alex Dewar
@ 2020-08-12 20:37   ` Frank van der Linden
  0 siblings, 0 replies; 7+ messages in thread
From: Frank van der Linden @ 2020-08-12 20:37 UTC (permalink / raw)
  To: Alex Dewar; +Cc: J. Bruce Fields, Chuck Lever, linux-nfs, linux-kernel

On Wed, Aug 12, 2020 at 03:12:52PM +0100, Alex Dewar wrote:
> 
> Fix typos in nfs4xdr.c.
> 
> Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
> ---
>  fs/nfsd/nfs4xdr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 1a0341fd80f9a..3db789139a71f 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -4828,7 +4828,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
>                 slen = strlen(sp);
> 
>                 /*
> -                * Check if this a user. attribute, skip it if not.
> +                * Check if this is a user attribute, skip it if not.
>                  */
>                 if (strncmp(sp, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN))
>                         goto contloop;
> --
> 2.28.0
> 

"this a" should indeed by "this is a", but "user." is not a typo - it is
talking about checking the prefix of the extended attribute, which is
"user.", so the "." is intended to be there.

Thanks,

- Frank

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

* Re: [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c
  2020-08-12 20:36 ` [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Frank van der Linden
@ 2020-08-13 19:01   ` Chuck Lever
  2020-08-20 23:37   ` Alex Dewar
  1 sibling, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2020-08-13 19:01 UTC (permalink / raw)
  To: Bruce Fields
  Cc: Alex Dewar, Frank van der Linden, Linux NFS Mailing List, open list



> On Aug 12, 2020, at 4:36 PM, Frank van der Linden <fllinden@amazon.com> wrote:
> 
> On Wed, Aug 12, 2020 at 03:12:51PM +0100, Alex Dewar wrote:
>> 
>> In nfsd4_encode_listxattrs(), the variable p is assigned to at one point
>> but this value is never used before p is reassigned. Fix this.
>> 
>> Addresses-Coverity: ("Unused value")
>> Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
>> ---
>> fs/nfsd/nfs4xdr.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
>> index 259d5ad0e3f47..1a0341fd80f9a 100644
>> --- a/fs/nfsd/nfs4xdr.c
>> +++ b/fs/nfsd/nfs4xdr.c
>> @@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
>>                        goto out;
>>                }
>> 
>> -               p = xdr_encode_opaque(p, sp, slen);
>> +               xdr_encode_opaque(p, sp, slen);
>> 
>>                xdrleft -= xdrlen;
>>                count++;
>> --
>> 2.28.0
>> 
> 
> Yep, I guess my linting missed that, thanks for the fix.

Bruce, these two don't appear to be urgent, so I'm deferring them
to you for v5.10.


--
Chuck Lever




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

* Re: [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c
  2020-08-12 20:36 ` [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Frank van der Linden
  2020-08-13 19:01   ` Chuck Lever
@ 2020-08-20 23:37   ` Alex Dewar
  2020-08-26 20:09     ` J. Bruce Fields
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Dewar @ 2020-08-20 23:37 UTC (permalink / raw)
  To: Frank van der Linden
  Cc: Alex Dewar, J. Bruce Fields, Chuck Lever, linux-nfs, linux-kernel

On Wed, Aug 12, 2020 at 08:36:31PM +0000, Frank van der Linden wrote:
> On Wed, Aug 12, 2020 at 03:12:51PM +0100, Alex Dewar wrote:
> > 
> > In nfsd4_encode_listxattrs(), the variable p is assigned to at one point
> > but this value is never used before p is reassigned. Fix this.
> > 
> > Addresses-Coverity: ("Unused value")
> > Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
> > ---
> >  fs/nfsd/nfs4xdr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> > index 259d5ad0e3f47..1a0341fd80f9a 100644
> > --- a/fs/nfsd/nfs4xdr.c
> > +++ b/fs/nfsd/nfs4xdr.c
> > @@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
> >                         goto out;
> >                 }
> > 
> > -               p = xdr_encode_opaque(p, sp, slen);
> > +               xdr_encode_opaque(p, sp, slen);
> > 
> >                 xdrleft -= xdrlen;
> >                 count++;
> > --
> > 2.28.0
> > 
> 
> Yep, I guess my linting missed that, thanks for the fix.
> 
> - Frank

Ping? The second patch in this series had a mistake in it, but I think
this one's still good to go :-)

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

* Re: [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c
  2020-08-20 23:37   ` Alex Dewar
@ 2020-08-26 20:09     ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2020-08-26 20:09 UTC (permalink / raw)
  To: Alex Dewar; +Cc: Frank van der Linden, Chuck Lever, linux-nfs, linux-kernel

On Fri, Aug 21, 2020 at 12:37:45AM +0100, Alex Dewar wrote:
> On Wed, Aug 12, 2020 at 08:36:31PM +0000, Frank van der Linden wrote:
> > On Wed, Aug 12, 2020 at 03:12:51PM +0100, Alex Dewar wrote:
> > > 
> > > In nfsd4_encode_listxattrs(), the variable p is assigned to at one point
> > > but this value is never used before p is reassigned. Fix this.
> > > 
> > > Addresses-Coverity: ("Unused value")
> > > Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
> > > ---
> > >  fs/nfsd/nfs4xdr.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> > > index 259d5ad0e3f47..1a0341fd80f9a 100644
> > > --- a/fs/nfsd/nfs4xdr.c
> > > +++ b/fs/nfsd/nfs4xdr.c
> > > @@ -4859,7 +4859,7 @@ nfsd4_encode_listxattrs(struct nfsd4_compoundres *resp, __be32 nfserr,
> > >                         goto out;
> > >                 }
> > > 
> > > -               p = xdr_encode_opaque(p, sp, slen);
> > > +               xdr_encode_opaque(p, sp, slen);
> > > 
> > >                 xdrleft -= xdrlen;
> > >                 count++;
> > > --
> > > 2.28.0
> > > 
> > 
> > Yep, I guess my linting missed that, thanks for the fix.
> > 
> > - Frank
> 
> Ping? The second patch in this series had a mistake in it, but I think
> this one's still good to go :-)

Thanks, applied for 5.10.--b.

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

end of thread, other threads:[~2020-08-26 20:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 14:12 [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Alex Dewar
2020-08-12 14:12 ` [PATCH 2/2] nfsd: Fix typo in comment Alex Dewar
2020-08-12 20:37   ` Frank van der Linden
2020-08-12 20:36 ` [PATCH 1/2] nfsd: Remove unnecessary assignment in nfs4xdr.c Frank van der Linden
2020-08-13 19:01   ` Chuck Lever
2020-08-20 23:37   ` Alex Dewar
2020-08-26 20:09     ` J. 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.