* linux-next: build warning after merge of the xfs tree
@ 2020-05-08 1:15 Stephen Rothwell
2020-05-08 10:55 ` [PATCH] xfs: fix unused variable warning in buffer completion on !DEBUG Brian Foster
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2020-05-08 1:15 UTC (permalink / raw)
To: Darrick J. Wong, David Chinner, linux-xfs
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Brian Foster
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
Hi all,
After merging the xfs tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
fs/xfs/xfs_buf.c: In function 'xfs_buf_bio_end_io':
fs/xfs/xfs_buf.c:1292:20: warning: unused variable 'mp' [-Wunused-variable]
1292 | struct xfs_mount *mp = bp->b_mount;
| ^~
Introduced by commit
7376d7454734 ("xfs: random buffer write failure errortag")
DEBUG is not defined.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] xfs: fix unused variable warning in buffer completion on !DEBUG
2020-05-08 1:15 linux-next: build warning after merge of the xfs tree Stephen Rothwell
@ 2020-05-08 10:55 ` Brian Foster
2020-05-08 12:08 ` Christoph Hellwig
2020-05-08 15:50 ` Darrick J. Wong
0 siblings, 2 replies; 4+ messages in thread
From: Brian Foster @ 2020-05-08 10:55 UTC (permalink / raw)
To: linux-xfs; +Cc: Darrick J . Wong
The random buffer write failure errortag patch introduced a local
mount pointer variable for the test macro, but the macro is compiled
out on !DEBUG kernels. This results in an unused variable warning.
Access the mount structure through the buffer pointer and remove the
local mount pointer to address the warning.
Fixes: 7376d745473 ("xfs: random buffer write failure errortag")
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
Feel free to fold this into the original commit or merge independently.
Sorry for the noise..
Brian
fs/xfs/xfs_buf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 9d8841ac7375..9c2fbb6bbf89 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1289,11 +1289,10 @@ xfs_buf_bio_end_io(
struct bio *bio)
{
struct xfs_buf *bp = (struct xfs_buf *)bio->bi_private;
- struct xfs_mount *mp = bp->b_mount;
if (!bio->bi_status &&
(bp->b_flags & XBF_WRITE) && (bp->b_flags & XBF_ASYNC) &&
- XFS_TEST_ERROR(false, mp, XFS_ERRTAG_BUF_IOERROR))
+ XFS_TEST_ERROR(false, bp->b_mount, XFS_ERRTAG_BUF_IOERROR))
bio->bi_status = BLK_STS_IOERR;
/*
--
2.21.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] xfs: fix unused variable warning in buffer completion on !DEBUG
2020-05-08 10:55 ` [PATCH] xfs: fix unused variable warning in buffer completion on !DEBUG Brian Foster
@ 2020-05-08 12:08 ` Christoph Hellwig
2020-05-08 15:50 ` Darrick J. Wong
1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2020-05-08 12:08 UTC (permalink / raw)
To: Brian Foster; +Cc: linux-xfs, Darrick J . Wong
On Fri, May 08, 2020 at 06:55:59AM -0400, Brian Foster wrote:
> The random buffer write failure errortag patch introduced a local
> mount pointer variable for the test macro, but the macro is compiled
> out on !DEBUG kernels. This results in an unused variable warning.
>
> Access the mount structure through the buffer pointer and remove the
> local mount pointer to address the warning.
>
> Fixes: 7376d745473 ("xfs: random buffer write failure errortag")
> Signed-off-by: Brian Foster <bfoster@redhat.com>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] xfs: fix unused variable warning in buffer completion on !DEBUG
2020-05-08 10:55 ` [PATCH] xfs: fix unused variable warning in buffer completion on !DEBUG Brian Foster
2020-05-08 12:08 ` Christoph Hellwig
@ 2020-05-08 15:50 ` Darrick J. Wong
1 sibling, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2020-05-08 15:50 UTC (permalink / raw)
To: Brian Foster; +Cc: linux-xfs
On Fri, May 08, 2020 at 06:55:59AM -0400, Brian Foster wrote:
> The random buffer write failure errortag patch introduced a local
> mount pointer variable for the test macro, but the macro is compiled
> out on !DEBUG kernels. This results in an unused variable warning.
>
> Access the mount structure through the buffer pointer and remove the
> local mount pointer to address the warning.
>
> Fixes: 7376d745473 ("xfs: random buffer write failure errortag")
> Signed-off-by: Brian Foster <bfoster@redhat.com>
Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
>
> Feel free to fold this into the original commit or merge independently.
> Sorry for the noise..
>
> Brian
>
> fs/xfs/xfs_buf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 9d8841ac7375..9c2fbb6bbf89 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1289,11 +1289,10 @@ xfs_buf_bio_end_io(
> struct bio *bio)
> {
> struct xfs_buf *bp = (struct xfs_buf *)bio->bi_private;
> - struct xfs_mount *mp = bp->b_mount;
>
> if (!bio->bi_status &&
> (bp->b_flags & XBF_WRITE) && (bp->b_flags & XBF_ASYNC) &&
> - XFS_TEST_ERROR(false, mp, XFS_ERRTAG_BUF_IOERROR))
> + XFS_TEST_ERROR(false, bp->b_mount, XFS_ERRTAG_BUF_IOERROR))
> bio->bi_status = BLK_STS_IOERR;
>
> /*
> --
> 2.21.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-08 15:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-08 1:15 linux-next: build warning after merge of the xfs tree Stephen Rothwell
2020-05-08 10:55 ` [PATCH] xfs: fix unused variable warning in buffer completion on !DEBUG Brian Foster
2020-05-08 12:08 ` Christoph Hellwig
2020-05-08 15:50 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox