Hi,

> +static inline void xhci_dma_write_u32s(XHCIState *xhci, dma_addr_t addr,
> +                                       uint32_t *buf, size_t len)
> +{
> +    int i;
> +
> +    for (i = 0; i < (len / sizeof(uint32_t)); i++) {
> +        buf[i] = cpu_to_le32(buf[i]);
> +    }
> +    pci_dma_write(&xhci->pci_dev, addr, buf, len);
> +}

I think we should use a temporary buffer here, otherwise you leave the
values byteswapped in buf which likely has unwanted side effects.

cheers,
  Gerd


Reply via email to