linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] libxfs: turn the xfs_buf_incore stub into an inline function
Date: Sun, 26 Jan 2020 13:24:09 -0800	[thread overview]
Message-ID: <20200126212409.GA3447196@magnolia> (raw)
In-Reply-To: <20200126091717.516904-1-hch@lst.de>

On Sun, Jan 26, 2020 at 10:17:17AM +0100, Christoph Hellwig wrote:
> Replace the macro with an inline function to avoid compiler warnings with new
> backports of kernel code.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

HAH YES, thank you!!!  <giddy dance>

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

--D

> ---
>  libxfs/libxfs_priv.h | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
> index 03edf0d3..2b73963c 100644
> --- a/libxfs/libxfs_priv.h
> +++ b/libxfs/libxfs_priv.h
> @@ -369,14 +369,12 @@ roundup_64(uint64_t x, uint32_t y)
>  #define XFS_BUF_UNDELAYWRITE(bp)	((bp)->b_flags &= ~LIBXFS_B_DIRTY)
>  #define XFS_BUF_SET_BDSTRAT_FUNC(a,b)	((void) 0)
>  
> -/* avoid gcc warning */
> -#define xfs_buf_incore(bt,blkno,len,lockit) ({		\
> -	typeof(blkno) __foo = (blkno);			\
> -	typeof(len) __bar = (len);			\
> -	(blkno) = __foo;				\
> -	(len) = __bar; /* no set-but-unused warning */	\
> -	NULL;						\
> -})
> +static inline struct xfs_buf *xfs_buf_incore(struct xfs_buftarg *target,
> +		xfs_daddr_t blkno, size_t numblks, xfs_buf_flags_t flags)
> +{
> +	return NULL;
> +}
> +
>  #define xfs_buf_relse(bp)		libxfs_putbuf(bp)
>  #define xfs_buf_get(devp,blkno,len)	(libxfs_getbuf((devp), (blkno), (len)))
>  #define xfs_bwrite(bp)			libxfs_writebuf((bp), 0)
> -- 
> 2.24.1
> 

      reply	other threads:[~2020-01-26 21:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26  9:17 [PATCH] libxfs: turn the xfs_buf_incore stub into an inline function Christoph Hellwig
2020-01-26 21:24 ` Darrick J. Wong [this message]

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=20200126212409.GA3447196@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --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;
as well as URLs for NNTP newsgroup(s).