On 10/02/2014 12:55 AM, John Snow wrote:
> +    /* If this is true, you're leaking memory. */

... or qsg is uninitialized, which would work because qemu_sglist_init
initializes all fields.

This is the only comment I have on the series. :)

Paolo

> +    assert(qsg->sg == NULL);
> +
>      qsg->sg = g_malloc(alloc_hint * sizeof(ScatterGatherEntry));

> 
> @@ -1147,7 +1147,7 @@ static int ahci_dma_prepare_buf(IDEDMA *dma, int 
> is_write)
>      s->io_buffer_size = s->sg.size;
>  
>      DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
> -    return s->io_buffer_size != 0;
> +    return s->io_buffer_size / 512 != 0;
>  }

Reply via email to