From: "Darrick J. Wong" <djwong@kernel.org>
To: sunliming <sunliming@kylinos.cn>
Cc: hch@lst.de, dchinner@redhat.com, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org, kelulanainsley@gmail.com,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH RESEND] xfs: fix for variable set but not used warning
Date: Mon, 18 Jul 2022 19:01:17 -0700 [thread overview]
Message-ID: <YtYQbQ48Evn62pgb@magnolia> (raw)
In-Reply-To: <20220719015442.646442-1-sunliming@kylinos.cn>
On Tue, Jul 19, 2022 at 09:54:42AM +0800, sunliming wrote:
> Fix below kernel warning:
>
> fs/xfs/scrub/repair.c:539:19: warning: variable 'agno' set but not used [-Wunused-but-set-variable]
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: sunliming <sunliming@kylinos.cn>
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Ah, right, I did forget to push it in last week's batch, sorry about
that. It'll be in Thursday's posting, thank you for the reminder.
--D
> ---
> fs/xfs/scrub/repair.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
> index a02ec8fbc8ac..032de115e373 100644
> --- a/fs/xfs/scrub/repair.c
> +++ b/fs/xfs/scrub/repair.c
> @@ -533,14 +533,12 @@ xrep_reap_block(
> {
> struct xfs_btree_cur *cur;
> struct xfs_buf *agf_bp = NULL;
> - xfs_agnumber_t agno;
> xfs_agblock_t agbno;
> bool has_other_rmap;
> int error;
>
> - agno = XFS_FSB_TO_AGNO(sc->mp, fsbno);
> agbno = XFS_FSB_TO_AGBNO(sc->mp, fsbno);
> - ASSERT(agno == sc->sa.pag->pag_agno);
> + ASSERT(XFS_FSB_TO_AGNO(sc->mp, fsbno) == sc->sa.pag->pag_agno);
>
> /*
> * If we are repairing per-inode metadata, we need to read in the AGF
> --
> 2.25.1
>
next prev parent reply other threads:[~2022-07-19 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 1:54 [PATCH RESEND] xfs: fix for variable set but not used warning sunliming
2022-07-19 2:01 ` Darrick J. Wong [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-13 1:43 sunliming
2022-07-13 5:51 ` 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=YtYQbQ48Evn62pgb@magnolia \
--to=djwong@kernel.org \
--cc=dchinner@redhat.com \
--cc=hch@lst.de \
--cc=kelulanainsley@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=lkp@intel.com \
--cc=sunliming@kylinos.cn \
/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