[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PULL 21/29] xen/pt: Sync up the dev.config and data values.




On 10/09/2015 19:15, Stefano Stabellini wrote:
> +
> +        switch (reg->size) {
> +        case 1: rc = xen_host_pci_get_byte(&s->real_device, offset, (uint8_t 
> *)&val);

A bit ugly, and it relies on the host being little endian.

> +                break;
> +        case 2: rc = xen_host_pci_get_word(&s->real_device, offset, 
> (uint16_t *)&val);

Same here.

> +                break;
> +        case 4: rc = xen_host_pci_get_long(&s->real_device, offset, &val);
> +                break;
> +        default: assert(1);

This should be assert(0) or, better, abort().

Paolo

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.