public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: linux-xfs@vger.kernel.org,
	Andrey Albershteyn <aalbersh@kernel.org>,
	Christoph Hellwig <hch@lst.de>, Carlos Maiolino <cem@kernel.org>
Subject: Re: [PATCH v3 2/6] mkfs: remove unnecessary return value affectation
Date: Tue, 6 Jan 2026 08:17:10 -0800	[thread overview]
Message-ID: <20260106161710.GC191501@frogsfrogsfrogs> (raw)
In-Reply-To: <20251220025326.209196-3-dlemoal@kernel.org>

On Sat, Dec 20, 2025 at 11:53:22AM +0900, Damien Le Moal wrote:
> The function report_zones() in mkfs/xfs_mkfs.c is a void function. So
> there is no need to set the variable ret to -EIO before returning if
> fstat() fails.
> 
> Fixes: 2e5a737a61d3 ("xfs_mkfs: support creating file system with zoned RT devices")
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

LGTM,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  mkfs/xfs_mkfs.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index bc6a28b63c24..550fc011b614 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -2589,10 +2589,8 @@ report_zones(
>  		exit(1);
>  	}
>  
> -	if (fstat(fd, &st) < 0) {
> -		ret = -EIO;
> +	if (fstat(fd, &st) < 0)
>  		goto out_close;
> -	}
>  	if (!S_ISBLK(st.st_mode))
>  		goto out_close;
>  
> -- 
> 2.52.0
> 
> 

  reply	other threads:[~2026-01-06 16:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-20  2:53 [PATCH v3 0/6] Enable cached zone report Damien Le Moal
2025-12-20  2:53 ` [PATCH v3 1/6] libxfs: add missing forward declaration in xfs_zones.h Damien Le Moal
2026-01-06 16:16   ` Darrick J. Wong
2026-01-07  6:20   ` Christoph Hellwig
2025-12-20  2:53 ` [PATCH v3 2/6] mkfs: remove unnecessary return value affectation Damien Le Moal
2026-01-06 16:17   ` Darrick J. Wong [this message]
2026-01-07  6:20   ` Christoph Hellwig
2025-12-20  2:53 ` [PATCH v3 3/6] libfrog: introduce xfrog_report_zones Damien Le Moal
2026-01-06 16:29   ` Darrick J. Wong
2025-12-20  2:53 ` [PATCH v3 4/6] mkfs: use xfrog_report_zones() Damien Le Moal
2026-01-06 16:31   ` Darrick J. Wong
2025-12-20  2:53 ` [PATCH v3 5/6] repair: " Damien Le Moal
2025-12-20  2:53 ` [PATCH v3 6/6] libfrog: enable cached report zones Damien Le Moal
2026-01-06 16:34   ` Darrick J. Wong
2026-01-07  6:22   ` Christoph Hellwig

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=20260106161710.GC191501@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@kernel.org \
    --cc=cem@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --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