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 sparse warning on allocation cursor initialization
Date: Mon, 21 Oct 2019 08:45:56 -0700 [thread overview]
Message-ID: <20191021154556.GE6719@magnolia> (raw)
In-Reply-To: <20191021131404.30089-1-bfoster@redhat.com>
On Mon, Oct 21, 2019 at 09:14:04AM -0400, Brian Foster wrote:
> sparse complains about the initialization used for the allocation
> cursor:
>
> >> fs/xfs/libxfs/xfs_alloc.c:1170:41: sparse: sparse: Using plain integer as NULL pointer
>
> Fix it by removing the unnecessary initialization value.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
Looks ok, though I have to rebase the iomap / xfs branches anyway so I
might apply this to the original patch.
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/libxfs/xfs_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
> index e9f74eb92073..925eba9489d5 100644
> --- a/fs/xfs/libxfs/xfs_alloc.c
> +++ b/fs/xfs/libxfs/xfs_alloc.c
> @@ -1471,7 +1471,7 @@ STATIC int
> xfs_alloc_ag_vextent_near(
> struct xfs_alloc_arg *args)
> {
> - struct xfs_alloc_cur acur = {0,};
> + struct xfs_alloc_cur acur = {};
> int error; /* error code */
> int i; /* result code, temporary */
> xfs_agblock_t bno;
> --
> 2.20.1
>
prev parent reply other threads:[~2019-10-21 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-19 20:07 [xfs-linux:xfs-for-next 29/47] fs/xfs/libxfs/xfs_alloc.c:1170:41: sparse: sparse: Using plain integer as NULL pointer kbuild test robot
2019-10-21 13:14 ` [PATCH] xfs: fix sparse warning on allocation cursor initialization Brian Foster
2019-10-21 15:45 ` 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=20191021154556.GE6719@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