From: Brian Foster <bfoster@redhat.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
David Chinner <david@fromorbit.com>,
linux-xfs@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the xfs tree
Date: Mon, 25 Jan 2021 08:26:16 -0500 [thread overview]
Message-ID: <20210125132616.GB2047559@bfoster> (raw)
In-Reply-To: <20210125095532.64288d47@canb.auug.org.au>
On Mon, Jan 25, 2021 at 09:55:32AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the xfs tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> fs/xfs/xfs_log.c: In function 'xfs_log_cover':
> fs/xfs/xfs_log.c:1111:16: warning: unused variable 'log' [-Wunused-variable]
> 1111 | struct xlog *log = mp->m_log;
> | ^~~
>
> Introduced by commit
>
> 303591a0a947 ("xfs: cover the log during log quiesce")
>
Oops, patch below. Feel free to apply or squash into the original
commit.
Brian
--- 8< ---
From 6078f06e2bd4c82111a85a2032c39a56654b0be6 Mon Sep 17 00:00:00 2001
From: Brian Foster <bfoster@redhat.com>
Date: Mon, 25 Jan 2021 08:22:56 -0500
Subject: [PATCH] xfs: fix unused log variable in xfs_log_cover()
The log variable is only used in kernels with asserts enabled.
Remove it and open code the dereference to avoid unused variable
warnings.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
fs/xfs/xfs_log.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 58699881c100..d8b814227734 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1108,12 +1108,11 @@ static int
xfs_log_cover(
struct xfs_mount *mp)
{
- struct xlog *log = mp->m_log;
int error = 0;
bool need_covered;
- ASSERT((xlog_cil_empty(log) && xlog_iclogs_empty(log) &&
- !xfs_ail_min_lsn(log->l_ailp)) ||
+ ASSERT((xlog_cil_empty(mp->m_log) && xlog_iclogs_empty(mp->m_log) &&
+ !xfs_ail_min_lsn(mp->m_log->l_ailp)) ||
XFS_FORCED_SHUTDOWN(mp));
if (!xfs_log_writable(mp))
--
2.26.2
next prev parent reply other threads:[~2021-01-26 19:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-24 22:55 linux-next: build warning after merge of the xfs tree Stephen Rothwell
2021-01-25 13:26 ` Brian Foster [this message]
2021-01-27 3:14 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2024-02-23 4:36 Stephen Rothwell
2024-02-23 6:35 ` Christoph Hellwig
2024-02-23 8:55 ` Mauro Carvalho Chehab
2024-02-23 14:06 ` Christoph Hellwig
2024-02-24 9:07 ` Akira Yokosawa
2024-02-26 10:57 ` Christoph Hellwig
2021-06-07 0:48 Stephen Rothwell
2021-06-07 1:15 ` Dave Chinner
2021-02-08 12:44 Stephen Rothwell
2020-05-08 1:15 Stephen Rothwell
2020-01-16 0:37 Stephen Rothwell
2020-01-15 22:12 Stephen Rothwell
2020-01-24 2:47 ` Stephen Rothwell
2020-01-24 4:17 ` Darrick J. Wong
2017-10-31 22:42 Stephen Rothwell
2017-08-31 0:07 Stephen Rothwell
2017-08-31 10:30 ` Brian Foster
2017-08-31 14:57 ` Darrick J. Wong
2017-08-31 15:22 ` Brian Foster
2017-08-31 15:41 ` Darrick J. Wong
2017-08-31 21:32 ` Dave Chinner
2010-03-04 0:19 Stephen Rothwell
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=20210125132616.GB2047559@bfoster \
--to=bfoster@redhat.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).