Re: [Qemu-devel] [PATCH 01/16] Allow zero alloc_hint in qemu_sglist_init()

2010-11-22 Thread Hannes Reinecke
On 11/19/2010 07:28 PM, Christoph Hellwig wrote: > On Thu, Nov 18, 2010 at 03:44:34PM +0100, Hannes Reinecke wrote: >> >> qemu_malloc doesn't check for zero argument, so we need to >> check ourselves. > > I'm not sure if it's a that good idea to remove the implicit > ->sg != NULL assumption. Any

Re: [Qemu-devel] [PATCH 01/16] Allow zero alloc_hint in qemu_sglist_init()

2010-11-19 Thread Christoph Hellwig
On Thu, Nov 18, 2010 at 03:44:34PM +0100, Hannes Reinecke wrote: > > qemu_malloc doesn't check for zero argument, so we need to > check ourselves. I'm not sure if it's a that good idea to remove the implicit ->sg != NULL assumption. Any reason you can't simply call qemu_sglist_init later?

[Qemu-devel] [PATCH 01/16] Allow zero alloc_hint in qemu_sglist_init()

2010-11-18 Thread Hannes Reinecke
qemu_malloc doesn't check for zero argument, so we need to check ourselves. Signed-off-by: Hannes Reinecke --- dma-helpers.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index 712ed89..877b2c3 100644 --- a/dma-helpers.c +++ b/dma-hel