All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs:xfs:scrub: Removed unneeded variable.
@ 2019-09-20 13:17 Aliasgar Surti
  2019-09-23 13:24 ` Brian Foster
  2019-09-23 23:48 ` Darrick J. Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Aliasgar Surti @ 2019-09-20 13:17 UTC (permalink / raw)
  To: darrick.wong, linux-xfs, david, bfoster; +Cc: Aliasgar Surti

From: Aliasgar Surti <aliasgar.surti500@gmail.com>

Returned value directly instead of using variable as it wasn't updated.

Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
---
 fs/xfs/scrub/alloc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c
index a43d181..5533e48 100644
--- a/fs/xfs/scrub/alloc.c
+++ b/fs/xfs/scrub/alloc.c
@@ -97,7 +97,6 @@ xchk_allocbt_rec(
 	xfs_agnumber_t		agno = bs->cur->bc_private.a.agno;
 	xfs_agblock_t		bno;
 	xfs_extlen_t		len;
-	int			error = 0;
 
 	bno = be32_to_cpu(rec->alloc.ar_startblock);
 	len = be32_to_cpu(rec->alloc.ar_blockcount);
@@ -109,7 +108,7 @@ xchk_allocbt_rec(
 
 	xchk_allocbt_xref(bs->sc, bno, len);
 
-	return error;
+	return 0;
 }
 
 /* Scrub the freespace btrees for some AG. */
-- 
2.7.4


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

* Re: [PATCH] fs:xfs:scrub: Removed unneeded variable.
  2019-09-20 13:17 [PATCH] fs:xfs:scrub: Removed unneeded variable Aliasgar Surti
@ 2019-09-23 13:24 ` Brian Foster
  2019-09-23 23:48 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Foster @ 2019-09-23 13:24 UTC (permalink / raw)
  To: Aliasgar Surti; +Cc: darrick.wong, linux-xfs, david

On Fri, Sep 20, 2019 at 06:47:44PM +0530, Aliasgar Surti wrote:
> From: Aliasgar Surti <aliasgar.surti500@gmail.com>
> 
> Returned value directly instead of using variable as it wasn't updated.
> 
> Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
> ---

I'm not sure we need the funky fs:xfs:scrub prefix thing on the patch
title. I'd just call it something like:

  xfs: remove unused error variable from xchk_allocbt_rec()

Otherwise looks fine to me:

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/scrub/alloc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c
> index a43d181..5533e48 100644
> --- a/fs/xfs/scrub/alloc.c
> +++ b/fs/xfs/scrub/alloc.c
> @@ -97,7 +97,6 @@ xchk_allocbt_rec(
>  	xfs_agnumber_t		agno = bs->cur->bc_private.a.agno;
>  	xfs_agblock_t		bno;
>  	xfs_extlen_t		len;
> -	int			error = 0;
>  
>  	bno = be32_to_cpu(rec->alloc.ar_startblock);
>  	len = be32_to_cpu(rec->alloc.ar_blockcount);
> @@ -109,7 +108,7 @@ xchk_allocbt_rec(
>  
>  	xchk_allocbt_xref(bs->sc, bno, len);
>  
> -	return error;
> +	return 0;
>  }
>  
>  /* Scrub the freespace btrees for some AG. */
> -- 
> 2.7.4
> 

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

* Re: [PATCH] fs:xfs:scrub: Removed unneeded variable.
  2019-09-20 13:17 [PATCH] fs:xfs:scrub: Removed unneeded variable Aliasgar Surti
  2019-09-23 13:24 ` Brian Foster
@ 2019-09-23 23:48 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2019-09-23 23:48 UTC (permalink / raw)
  To: Aliasgar Surti; +Cc: linux-xfs, david, bfoster

On Fri, Sep 20, 2019 at 06:47:44PM +0530, Aliasgar Surti wrote:
> From: Aliasgar Surti <aliasgar.surti500@gmail.com>
> 
> Returned value directly instead of using variable as it wasn't updated.
> 
> Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/scrub/alloc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c
> index a43d181..5533e48 100644
> --- a/fs/xfs/scrub/alloc.c
> +++ b/fs/xfs/scrub/alloc.c
> @@ -97,7 +97,6 @@ xchk_allocbt_rec(
>  	xfs_agnumber_t		agno = bs->cur->bc_private.a.agno;
>  	xfs_agblock_t		bno;
>  	xfs_extlen_t		len;
> -	int			error = 0;
>  
>  	bno = be32_to_cpu(rec->alloc.ar_startblock);
>  	len = be32_to_cpu(rec->alloc.ar_blockcount);
> @@ -109,7 +108,7 @@ xchk_allocbt_rec(
>  
>  	xchk_allocbt_xref(bs->sc, bno, len);
>  
> -	return error;
> +	return 0;
>  }
>  
>  /* Scrub the freespace btrees for some AG. */
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2019-09-23 23:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 13:17 [PATCH] fs:xfs:scrub: Removed unneeded variable Aliasgar Surti
2019-09-23 13:24 ` Brian Foster
2019-09-23 23:48 ` Darrick J. Wong

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.