* [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
@ 2017-11-30 18:30 Andrii Vladyka
2017-12-04 8:20 ` Dilger, Andreas
0 siblings, 1 reply; 6+ messages in thread
From: Andrii Vladyka @ 2017-11-30 18:30 UTC (permalink / raw)
To: oleg.drokin, andreas.dilger, jsimmons, gregkh
Cc: lustre-devel, devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 133 bytes --]
Change 0 to NULL in lov_object_fiemap() in order to fix warning produced
by sparse
Signed-off-by: Andrii Vladyka <tulup@mail.ru>
[-- Attachment #2: task16.patch --]
[-- Type: text/plain, Size: 519 bytes --]
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)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
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 ` Dilger, Andreas
2017-12-04 10:44 ` Andrii Vladyka
0 siblings, 1 reply; 6+ messages in thread
From: Dilger, Andreas @ 2017-12-04 8:20 UTC (permalink / raw)
To: Andrii Vladyka
Cc: Drokin, Oleg, jsimmons, gregkh, lustre-devel, devel, linux-kernel
> On Nov 30, 2017, at 11:30, Andrii Vladyka <tulup@mail.ru> 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>
Patches should be inline rather than in an attachment.
That said, the patch looks correct, so you can add:
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
2017-12-04 8:20 ` Dilger, Andreas
@ 2017-12-04 10:44 ` Andrii Vladyka
2017-12-06 8:53 ` gregkh
0 siblings, 1 reply; 6+ messages in thread
From: Andrii Vladyka @ 2017-12-04 10:44 UTC (permalink / raw)
To: Dilger, Andreas, Drokin, Oleg, jsimmons, gregkh
Cc: lustre-devel, devel, linux-kernel
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)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
2017-12-04 10:44 ` Andrii Vladyka
@ 2017-12-06 8:53 ` gregkh
2017-12-06 9:33 ` Andrii
2017-12-07 17:24 ` Joe Perches
0 siblings, 2 replies; 6+ messages in thread
From: gregkh @ 2017-12-06 8:53 UTC (permalink / raw)
To: Andrii Vladyka
Cc: Dilger, Andreas, Drokin, Oleg, jsimmons, lustre-devel, devel,
linux-kernel
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.
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
2017-12-06 8:53 ` gregkh
@ 2017-12-06 9:33 ` Andrii
2017-12-07 17:24 ` Joe Perches
1 sibling, 0 replies; 6+ messages in thread
From: Andrii @ 2017-12-06 9:33 UTC (permalink / raw)
To: gregkh
Cc: Dilger, Andreas, Drokin, Oleg, jsimmons, lustre-devel, devel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
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>
[-- Attachment #2: task16.patch --]
[-- Type: text/plain, Size: 519 bytes --]
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)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
2017-12-06 8:53 ` gregkh
2017-12-06 9:33 ` Andrii
@ 2017-12-07 17:24 ` Joe Perches
1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2017-12-07 17:24 UTC (permalink / raw)
To: gregkh, Andrii Vladyka
Cc: Dilger, Andreas, Drokin, Oleg, jsimmons, lustre-devel, devel,
linux-kernel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-12-07 17:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` Dilger, Andreas
2017-12-04 10:44 ` Andrii Vladyka
2017-12-06 8:53 ` gregkh
2017-12-06 9:33 ` Andrii
2017-12-07 17:24 ` Joe Perches
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).