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 2/8] xfs: trivial sparse fixes for the new scrub code
Date: Mon, 6 Nov 2017 12:10:23 -0800	[thread overview]
Message-ID: <20171106201023.GC6244@magnolia> (raw)
In-Reply-To: <20171106143456.13567-3-hch@lst.de>

On Mon, Nov 06, 2017 at 03:34:50PM +0100, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/xfs/scrub/attr.c  | 4 ++--
>  fs/xfs/scrub/bmap.c  | 2 +-
>  fs/xfs/scrub/btree.c | 2 +-
>  fs/xfs/scrub/dir.c   | 2 +-
>  fs/xfs/scrub/scrub.c | 2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c
> index 51a553337dc4..99992dd8a5c3 100644
> --- a/fs/xfs/scrub/attr.c
> +++ b/fs/xfs/scrub/attr.c
> @@ -91,7 +91,7 @@ xfs_scrub_xattr_listent(
>  	int				valuelen)
>  {
>  	struct xfs_scrub_xattr		*sx;
> -	struct xfs_da_args		args = {0};
> +	struct xfs_da_args		args = { NULL };
>  	int				error = 0;
>  
>  	sx = container_of(context, struct xfs_scrub_xattr, context);
> @@ -420,7 +420,7 @@ int
>  xfs_scrub_xattr(
>  	struct xfs_scrub_context	*sc)
>  {
> -	struct xfs_scrub_xattr		sx = { 0 };
> +	struct xfs_scrub_xattr		sx = { { NULL } };

gcc 5.4 (Ubuntu 16.04) complains about a missing initializer for sx.sc
here.  Seeing as we memset it immediately afterwards, I'll just remove
the whole init thing.

--D

>  	struct attrlist_cursor_kern	cursor = { 0 };
>  	xfs_dablk_t			last_checked = -1U;
>  	int				error = 0;
> diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
> index 39fb2a537aea..42fec0bcd9e1 100644
> --- a/fs/xfs/scrub/bmap.c
> +++ b/fs/xfs/scrub/bmap.c
> @@ -229,7 +229,7 @@ xfs_scrub_bmap(
>  	int				whichfork)
>  {
>  	struct xfs_bmbt_irec		irec;
> -	struct xfs_scrub_bmap_info	info = {0};
> +	struct xfs_scrub_bmap_info	info = { NULL };
>  	struct xfs_mount		*mp = sc->mp;
>  	struct xfs_inode		*ip = sc->ip;
>  	struct xfs_ifork		*ifp;
> diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c
> index 9e8b67a07baf..a81440496e7b 100644
> --- a/fs/xfs/scrub/btree.c
> +++ b/fs/xfs/scrub/btree.c
> @@ -414,7 +414,7 @@ xfs_scrub_btree(
>  	struct xfs_owner_info		*oinfo,
>  	void				*private)
>  {
> -	struct xfs_scrub_btree		bs = {0};
> +	struct xfs_scrub_btree		bs = { NULL };
>  	union xfs_btree_ptr		ptr;
>  	union xfs_btree_ptr		*pp;
>  	union xfs_btree_rec		*recp;
> diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c
> index 73ac795aa6a5..d4cd7661633d 100644
> --- a/fs/xfs/scrub/dir.c
> +++ b/fs/xfs/scrub/dir.c
> @@ -560,7 +560,7 @@ xfs_scrub_directory_free_bestfree(
>  	struct xfs_buf			*dbp;
>  	struct xfs_buf			*bp;
>  	__be16				*bestp;
> -	__be16				best;
> +	__u16				best;
>  	unsigned int			stale = 0;
>  	int				i;
>  	int				error;
> diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c
> index 8c8b52523fbc..9c42c4efd01e 100644
> --- a/fs/xfs/scrub/scrub.c
> +++ b/fs/xfs/scrub/scrub.c
> @@ -123,7 +123,7 @@
>   * structure state to decide (in broad terms) if scrub/repair are
>   * supported by the running kernel.
>   */
> -int
> +static int
>  xfs_scrub_probe(
>  	struct xfs_scrub_context	*sc)
>  {
> -- 
> 2.14.2
> 
> --
> 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

  reply	other threads:[~2017-11-06 20:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 14:34 sparse fixes Christoph Hellwig
2017-11-06 14:34 ` [PATCH 1/8] xfs: always define STATIC to static noinline Christoph Hellwig
2017-11-06 20:15   ` Darrick J. Wong
2017-11-06 14:34 ` [PATCH 2/8] xfs: trivial sparse fixes for the new scrub code Christoph Hellwig
2017-11-06 20:10   ` Darrick J. Wong [this message]
2017-11-06 14:34 ` [PATCH 3/8] xfs: mark xfs_errortag_ktype static Christoph Hellwig
2017-11-06 20:15   ` Darrick J. Wong
2017-11-06 14:34 ` [PATCH 4/8] xfs: remove unused debug counts for xfs_lock_inodes Christoph Hellwig
2017-11-06 20:17   ` Darrick J. Wong
2017-11-06 14:34 ` [PATCH 5/8] xfs: remove unreachable error injection code in xfs_qm_dqget Christoph Hellwig
2017-11-06 20:17   ` Darrick J. Wong
2017-11-06 14:34 ` [PATCH 6/8] xfs: mark xfs_btree_check_lblock and xfs_btree_check_ptr static Christoph Hellwig
2017-11-06 20:18   ` Darrick J. Wong
2017-11-06 14:34 ` [PATCH 7/8] xfs: mark xlog_recover_check_summary STATIC Christoph Hellwig
2017-11-06 20:19   ` Darrick J. Wong
2017-11-06 14:34 ` [PATCH 8/8] xfs: mark xlog_verify_dest_ptr STATIC Christoph Hellwig
2017-11-06 20:19   ` Darrick J. Wong

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=20171106201023.GC6244@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).