Re: [PATCH v2 06/12] block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures

2020-07-01 Thread Stefan Hajnoczi
On Tue, Jun 30, 2020 at 09:13:12PM +0200, Philippe Mathieu-Daudé wrote: > We allocate an unique chunk of memory then use it for two > different structures. By using an union, we make it clear > the data is overlapping (and we can remove the casts). > > Suggested-by: Stefan Hajnoczi > Signed-off-b

[PATCH v2 06/12] block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures

2020-06-30 Thread Philippe Mathieu-Daudé
We allocate an unique chunk of memory then use it for two different structures. By using an union, we make it clear the data is overlapping (and we can remove the casts). Suggested-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 31 +++ 1