public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [xfs-linux:xfs-4.15-merge 24/76] fs//xfs/xfs_buf.c:2136: warning: unused variable 'mp'
@ 2017-10-27  7:27 kbuild test robot
  2017-10-27 10:22 ` [PATCH] xfs: fix unused variable warning in xfs_buf_set_ref() Brian Foster
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-10-27  7:27 UTC (permalink / raw)
  To: Brian Foster; +Cc: kbuild-all, linux-xfs, Darrick J. Wong

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

tree:   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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35665 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] xfs: fix unused variable warning in xfs_buf_set_ref()
  2017-10-27  7:27 [xfs-linux:xfs-4.15-merge 24/76] fs//xfs/xfs_buf.c:2136: warning: unused variable 'mp' kbuild test robot
@ 2017-10-27 10:22 ` Brian Foster
  2017-10-27 16:21   ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Foster @ 2017-10-27 10:22 UTC (permalink / raw)
  To: linux-xfs

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 <bfoster@redhat.com>
---

Sigh, sorry for the noise..

Brian

 fs/xfs/xfs_buf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index d481dd2..db786bc 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -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);
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: fix unused variable warning in xfs_buf_set_ref()
  2017-10-27 10:22 ` [PATCH] xfs: fix unused variable warning in xfs_buf_set_ref() Brian Foster
@ 2017-10-27 16:21   ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2017-10-27 16:21 UTC (permalink / raw)
  To: Brian Foster; +Cc: linux-xfs

On Fri, Oct 27, 2017 at 06:22:48AM -0400, Brian Foster wrote:
> 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 <bfoster@redhat.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> ---
> 
> Sigh, sorry for the noise..
> 
> Brian
> 
>  fs/xfs/xfs_buf.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index d481dd2..db786bc 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -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);
> -- 
> 2.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-27 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27  7:27 [xfs-linux:xfs-4.15-merge 24/76] fs//xfs/xfs_buf.c:2136: warning: unused variable 'mp' kbuild test robot
2017-10-27 10:22 ` [PATCH] xfs: fix unused variable warning in xfs_buf_set_ref() Brian Foster
2017-10-27 16:21   ` 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