fs//xfs/xfs_buf.c:2136: warning: unused variable 'mp'
kbuild test robot
build bottree: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git xfs-4.15-merge head: 9c92ee208b1faa0ef2cc899b85fd0607b6fac7fe commit: 7561d27e90fa0df0aac2a1d6b49c2a28eaae7026 [24/76] xfs: buffer lru reference count error injection tag config: x86_64-randconfig-a0-10271430 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: git checkout 7561d27e90fa0df0aac2a1d6b49c2a28eaae7026 # save the attached .config to linux build tree make ARCH=x86_64
All warnings (new ones prefixed by >>):
fs//xfs/xfs_buf.c: In function 'xfs_buf_set_ref':
>> fs//xfs/xfs_buf.c:2136: warning: unused variable 'mp'
vim +/mp +2136 fs//xfs/xfs_buf.c
2133
2134 void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref)
2135 {
> 2136 struct xfs_mount *mp = bp->b_target->bt_mount;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH 1/1 xfs: fix unused variable warning in xfs_buf_set_ref()
Fix an unused variable warning on non-DEBUG builds introduced by commit 7561d27e90 ("xfs: buffer lru reference count error injection tag").
---
Sigh, sorry for the noise..
Brian
fs/xfs/xfs_buf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
fs/xfs/xfs_buf.c +2 -3
@@ -2133,14 +2133,13 @@ xfs_buf_terminate(void)void xfs_buf_set_ref (struct xfs_buf *bp,int lru_ref) { -struct xfs_mount *mp = bp->b_target->bt_mount; -/* * Set the lru reference count to 0 based on the error injection tag. * This allows userspace to disrupt buffer caching for debug/testing * purposes. */ -if (XFS_TEST_ERROR (false, mp,XFS_ERRTAG_BUF_LRU_REF )) +if (XFS_TEST_ERROR (false, bp->b_target->bt_mount, +XFS_ERRTAG_BUF_LRU_REF )) lru_ref =0 ;atomic_set (&bp->b_lru_ref, lru_ref);
Signature · 1 line
2.9.5
Re: [PATCH] xfs: fix unused variable warning in xfs_buf_set_ref()
Quoted 5 lines · Brian Foster
Fix an unused variable warning on non-DEBUG builds introduced by commit
7561d27e90("xfs: buffer lru reference count error injection tag").Signed-off-by Brian Foster <[email protected]>
Looks ok,
Quoted 37 lines
---
Sigh, sorry for the noise..
Brian
fs/xfs/xfs_buf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)fs/xfs/xfs_buf.c +2
-3@@ -2133,14 +2133,13 @@ xfs_buf_terminate(void)void xfs_buf_set_ref (struct xfs_buf *bp,int lru_ref) { -struct xfs_mount *mp = bp->b_target->bt_mount; -/* * Set the lru reference count to 0 based on the error injection tag. * This allows userspace to disrupt buffer caching for debug/testing * purposes. */ -if (XFS_TEST_ERROR (false, mp,XFS_ERRTAG_BUF_LRU_REF )) +if (XFS_TEST_ERROR (false, bp->b_target->bt_mount, +XFS_ERRTAG_BUF_LRU_REF )) lru_ref =0 ;atomic_set (&bp->b_lru_ref, lru_ref);Signature · 6 lines
2.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html