On 13/05/2015 16:42, Cornelia Huck wrote:
> +static bool virtio_device_confvec_needed(void *opaque)
> +{
> +    VirtIODevice *vdev = opaque;
> +    BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> +    VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
> +
> +    return k->needs_confvec ?
> +        k->needs_confvec(qbus->parent) :
> +        (vdev->config_vector != VIRTIO_NO_VECTOR);
> +}

This can call k->needs_confvec unconditionally, if the default
implementation is moved to a separate function.

Paolo

Reply via email to