From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix unused variable warning in xfs_buf_item_unlock()
Date: Thu, 31 Aug 2017 09:41:07 -0700 [thread overview]
Message-ID: <20170831164107.GL3775@magnolia> (raw)
In-Reply-To: <20170831160458.24886-1-bfoster@redhat.com>
On Thu, Aug 31, 2017 at 12:04:58PM -0400, Brian Foster wrote:
> The ordered variable generates an unused warning on !DEBUG builds.
> Separate the initialization of the associated variables from the
> declarations to quiet gcc.
>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> fs/xfs/xfs_buf_item.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
> index ef2c137..f5d25f5 100644
> --- a/fs/xfs/xfs_buf_item.c
> +++ b/fs/xfs/xfs_buf_item.c
> @@ -567,10 +567,15 @@ xfs_buf_item_unlock(
> {
> struct xfs_buf_log_item *bip = BUF_ITEM(lip);
> struct xfs_buf *bp = bip->bli_buf;
> - bool aborted = !!(lip->li_flags & XFS_LI_ABORTED);
> - bool hold = !!(bip->bli_flags & XFS_BLI_HOLD);
> - bool dirty = !!(bip->bli_flags & XFS_BLI_DIRTY);
> - bool ordered = !!(bip->bli_flags & XFS_BLI_ORDERED);
> + bool aborted;
> + bool hold;
> + bool dirty;
> + bool ordered;
> +
> + aborted = !!(lip->li_flags & XFS_LI_ABORTED);
> + hold = !!(bip->bli_flags & XFS_BLI_HOLD);
> + dirty = !!(bip->bli_flags & XFS_BLI_DIRTY);
> + ordered = !!(bip->bli_flags & XFS_BLI_ORDERED);
>
> /* Clear the buffer's association with this transaction. */
> bp->b_transp = NULL;
> --
> 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
next prev parent reply other threads:[~2017-08-31 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 16:04 [PATCH] xfs: fix unused variable warning in xfs_buf_item_unlock() Brian Foster
2017-08-31 16:41 ` Darrick J. Wong [this message]
2017-08-31 21:52 ` Dave Chinner
2017-09-01 10:24 ` Brian Foster
2017-09-01 22:07 ` Dave Chinner
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=20170831164107.GL3775@magnolia \
--to=darrick.wong@oracle.com \
--cc=bfoster@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/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