public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Aliasgar Surti <aliasgar.surti500@gmail.com>
Cc: darrick.wong@oracle.com, linux-xfs@vger.kernel.org, david@fromorbit.com
Subject: Re: [PATCH] fs:xfs:scrub: Removed unneeded variable.
Date: Mon, 23 Sep 2019 09:24:43 -0400	[thread overview]
Message-ID: <20190923132443.GB9071@bfoster> (raw)
In-Reply-To: <1568985464-31258-1-git-send-email-aliasgar.surti500@gmail.com>

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
> 

  reply	other threads:[~2019-09-23 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 13:17 [PATCH] fs:xfs:scrub: Removed unneeded variable Aliasgar Surti
2019-09-23 13:24 ` Brian Foster [this message]
2019-09-23 23:48 ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190923132443.GB9071@bfoster \
    --to=bfoster@redhat.com \
    --cc=aliasgar.surti500@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox