From: Joe Perches <joe@perches.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
Andrii Vladyka <tulup@mail.ru>
Cc: "Dilger, Andreas" <andreas.dilger@intel.com>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
"jsimmons@infradead.org" <jsimmons@infradead.org>,
"lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [lustre-devel] [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
Date: Thu, 07 Dec 2017 09:24:47 -0800 [thread overview]
Message-ID: <1512667487.960.46.camel@perches.com> (raw)
In-Reply-To: <20171206085303.GA18289@kroah.com>
On Wed, 2017-12-06 at 09:53 +0100, gregkh at linuxfoundation.org wrote:
> On Mon, Dec 04, 2017 at 12:44:32PM +0200, Andrii Vladyka wrote:
> > Change 0 to NULL in lov_object_fiemap() in order to fix warning produced by
> > sparse
> >
> > Signed-off-by: Andrii Vladyka <tulup@mail.ru>
> > Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
> > ---
> >
> > diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
> > index 105b707..897cf2c 100644
> > --- a/drivers/staging/lustre/lustre/lov/lov_object.c
> > +++ b/drivers/staging/lustre/lustre/lov/lov_object.c
> > @@ -1335,7 +1335,7 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
> > int rc = 0;
> > int cur_stripe;
> > int stripe_count;
> > - struct fiemap_state fs = { 0 };
> > + struct fiemap_state fs = { NULL };
> > lsm = lov_lsm_addref(cl2lov(obj));
> > if (!lsm)
>
> Patch is corrupted, and can not apply, please fix up your email client
> and try it again.
It would be better to use {} to clear the struct
rather than any member initialization.
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
Andrii Vladyka <tulup@mail.ru>
Cc: "Dilger, Andreas" <andreas.dilger@intel.com>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
"jsimmons@infradead.org" <jsimmons@infradead.org>,
"lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
Date: Thu, 07 Dec 2017 09:24:47 -0800 [thread overview]
Message-ID: <1512667487.960.46.camel@perches.com> (raw)
In-Reply-To: <20171206085303.GA18289@kroah.com>
On Wed, 2017-12-06 at 09:53 +0100, gregkh@linuxfoundation.org wrote:
> On Mon, Dec 04, 2017 at 12:44:32PM +0200, Andrii Vladyka wrote:
> > Change 0 to NULL in lov_object_fiemap() in order to fix warning produced by
> > sparse
> >
> > Signed-off-by: Andrii Vladyka <tulup@mail.ru>
> > Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
> > ---
> >
> > diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
> > index 105b707..897cf2c 100644
> > --- a/drivers/staging/lustre/lustre/lov/lov_object.c
> > +++ b/drivers/staging/lustre/lustre/lov/lov_object.c
> > @@ -1335,7 +1335,7 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
> > int rc = 0;
> > int cur_stripe;
> > int stripe_count;
> > - struct fiemap_state fs = { 0 };
> > + struct fiemap_state fs = { NULL };
> > lsm = lov_lsm_addref(cl2lov(obj));
> > if (!lsm)
>
> Patch is corrupted, and can not apply, please fix up your email client
> and try it again.
It would be better to use {} to clear the struct
rather than any member initialization.
next prev parent reply other threads:[~2017-12-07 17:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 18:30 [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap() Andrii Vladyka
2017-12-04 8:20 ` [lustre-devel] " Dilger, Andreas
2017-12-04 8:20 ` Dilger, Andreas
2017-12-04 10:44 ` Andrii Vladyka
2017-12-06 8:53 ` [lustre-devel] " gregkh at linuxfoundation.org
2017-12-06 8:53 ` gregkh
2017-12-06 9:33 ` Andrii
2017-12-07 17:24 ` Joe Perches [this message]
2017-12-07 17:24 ` Joe Perches
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=1512667487.960.46.camel@perches.com \
--to=joe@perches.com \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
--cc=tulup@mail.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.