linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libnvdimm: initialize struct blk_integrity with 0
@ 2016-06-23  9:52 Johannes Thumshirn
  2016-07-05  9:02 ` Johannes Thumshirn
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2016-06-23  9:52 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm, linux-kernel, Johannes Thumshirn

Initialize struct blk_integrity with 0 as blk_integrity_register() takes the
then unitialized struct blk_integrity::flags and ORs it to the resulting block
integrity structure.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/nvdimm/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c
index be89764..32e4fe2 100644
--- a/drivers/nvdimm/core.c
+++ b/drivers/nvdimm/core.c
@@ -601,7 +601,8 @@ int nd_integrity_init(struct gendisk *disk, unsigned long meta_size)
 	if (meta_size == 0)
 		return 0;
 
-	bi.profile = NULL;
+	memset(&bi, 0, sizeof(bi));
+
 	bi.tuple_size = meta_size;
 	bi.tag_size = meta_size;
 
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libnvdimm: initialize struct blk_integrity with 0
  2016-06-23  9:52 [PATCH] libnvdimm: initialize struct blk_integrity with 0 Johannes Thumshirn
@ 2016-07-05  9:02 ` Johannes Thumshirn
  2016-07-06 17:34   ` Dan Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2016-07-05  9:02 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm, linux-kernel

On Thu, Jun 23, 2016 at 11:52:04AM +0200, Johannes Thumshirn wrote:
> Initialize struct blk_integrity with 0 as blk_integrity_register() takes the
> then unitialized struct blk_integrity::flags and ORs it to the resulting block
> integrity structure.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
>  drivers/nvdimm/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c
> index be89764..32e4fe2 100644
> --- a/drivers/nvdimm/core.c
> +++ b/drivers/nvdimm/core.c
> @@ -601,7 +601,8 @@ int nd_integrity_init(struct gendisk *disk, unsigned long meta_size)
>  	if (meta_size == 0)
>  		return 0;
>  
> -	bi.profile = NULL;
> +	memset(&bi, 0, sizeof(bi));
> +
>  	bi.tuple_size = meta_size;
>  	bi.tag_size = meta_size;
>  
> -- 
> 2.8.4
> 

Dan,

have you seen this one? I've found it in patchwork but didn't get a mail on
the list either.

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libnvdimm: initialize struct blk_integrity with 0
  2016-07-05  9:02 ` Johannes Thumshirn
@ 2016-07-06 17:34   ` Dan Williams
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Williams @ 2016-07-06 17:34 UTC (permalink / raw)
  To: Johannes Thumshirn; +Cc: linux-nvdimm@lists.01.org, linux-kernel

On Tue, Jul 5, 2016 at 2:02 AM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Thu, Jun 23, 2016 at 11:52:04AM +0200, Johannes Thumshirn wrote:
>> Initialize struct blk_integrity with 0 as blk_integrity_register() takes the
>> then unitialized struct blk_integrity::flags and ORs it to the resulting block
>> integrity structure.
>>
>> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
>> ---
>>  drivers/nvdimm/core.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c
>> index be89764..32e4fe2 100644
>> --- a/drivers/nvdimm/core.c
>> +++ b/drivers/nvdimm/core.c
>> @@ -601,7 +601,8 @@ int nd_integrity_init(struct gendisk *disk, unsigned long meta_size)
>>       if (meta_size == 0)
>>               return 0;
>>
>> -     bi.profile = NULL;
>> +     memset(&bi, 0, sizeof(bi));
>> +
>>       bi.tuple_size = meta_size;
>>       bi.tag_size = meta_size;
>>
>> --
>> 2.8.4
>>
>
> Dan,
>
> have you seen this one? I've found it in patchwork but didn't get a mail on
> the list either.

Thanks for the nudge, I missed this.  Applied now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-06 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-23  9:52 [PATCH] libnvdimm: initialize struct blk_integrity with 0 Johannes Thumshirn
2016-07-05  9:02 ` Johannes Thumshirn
2016-07-06 17:34   ` Dan Williams

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).