On Fri, 05 Feb 2016 11:46:04 +0100
Greg Kurz <gk...@linux.vnet.ibm.com> wrote:

> After the call to virtio_vdev_has_feature(), we only care for legacy
> devices, so we don't need the extra check in virtio_is_big_endian().
> 
> Also the device_endian field is always set (VIRTIO_DEVICE_ENDIAN_UNKNOWN
> may only happen on a virtio_load() path that cannot lead here), so we
> don't need the assert() either.
> 
> This open codes the device_endian checking in vhost_needs_vring_endian().
> It also adds a comment to explain the logic, as recent reviews showed the
> cross-endian tweaks aren't that obvious.
> 
> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com>
> ---
>  hw/virtio/vhost.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com>


Reply via email to