xfs: trivial sparse fixes for the new scrub code
authorChristoph Hellwig <hch@lst.de>
Mon, 6 Nov 2017 19:53:58 +0000 (11:53 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Nov 2017 19:53:58 +0000 (11:53 -0800)
[darrick: fix broken initializer in xfs_scrub_xattr]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/scrub/attr.c
fs/xfs/scrub/bmap.c
fs/xfs/scrub/btree.c
fs/xfs/scrub/dir.c
fs/xfs/scrub/scrub.c

index 51a553337dc445148aabae4257023658976f013b..5cf30deb8144fee048700edfa897eff4a6d78b60 100644 (file)
@@ -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;
        struct attrlist_cursor_kern     cursor = { 0 };
        xfs_dablk_t                     last_checked = -1U;
        int                             error = 0;
index 39fb2a537aea8c9ef25695ce690dc0555b9494c9..42fec0bcd9e18d34760222671e43cbcb35c2f5f5 100644 (file)
@@ -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;
index 9e8b67a07bafe5cf6bac3f7024c62e86f6032d16..a81440496e7bfedb2ff060c09dfa2f0aabe5ea57 100644 (file)
@@ -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;
index 73ac795aa6a581f835fa9fa7043cba5ee728da4d..d4cd7661633d2d01533b516392a2c2ceb1e019ef 100644 (file)
@@ -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;
index 8c8b52523fbc62ff01647eb141a14bd5b169d163..9c42c4efd01ec57bb1945ba671780cc2687e49c3 100644 (file)
  * 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)
 {