[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v6 04/20] virtio: add feature checking helpe
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH RFC v6 04/20] virtio: add feature checking helpers |
Date: |
Fri, 12 Dec 2014 11:07:01 +0100 |
On Thu, 11 Dec 2014 15:46:23 +0100
Thomas Huth <address@hidden> wrote:
> > +static inline bool __virtio_has_feature(uint32_t features, unsigned int
> > fbit)
> > +{
> > + assert(fbit < 32);
> > + return !!(features & (1 << fbit));
> > +}
> > +
> > +static inline bool virtio_has_feature(VirtIODevice *vdev, unsigned int
> > fbit)
> > +{
> > + return __virtio_has_feature(vdev->guest_features, fbit);
> > +}
> > +
>
> I've got to say that I'm a little bit unhappy with the naming of the
> functions - and in contrast to the Linux kernel code, I think it is
> also quite uncommon in the QEMU sources to use function names with
> double underscores at the beginning.
>
> Could you maybe rename the second function to "virtio_vdev_has_feature"
> instead? And then remove the double underscores from the first function?
Renamed the functions just like this.
- [Qemu-devel] [PATCH RFC v6 00/20] qemu: towards virtio-1 host support, Cornelia Huck, 2014/12/11
- [Qemu-devel] [PATCH RFC v6 02/20] virtio: cull virtio_bus_set_vdev_features, Cornelia Huck, 2014/12/11
- [Qemu-devel] [PATCH RFC v6 03/20] virtio: feature bit manipulation helpers, Cornelia Huck, 2014/12/11
- [Qemu-devel] [PATCH RFC v6 06/20] virtio: endianness checks for virtio 1.0 devices, Cornelia Huck, 2014/12/11
- [Qemu-devel] [PATCH RFC v6 05/20] virtio: support more feature bits, Cornelia Huck, 2014/12/11
- [Qemu-devel] [PATCH RFC v6 08/20] dataplane: allow virtio-1 devices, Cornelia Huck, 2014/12/11
- [Qemu-devel] [PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call, Cornelia Huck, 2014/12/11
- [Qemu-devel] [PATCH RFC v6 09/20] s390x/css: Add a callback for when subchannel gets disabled, Cornelia Huck, 2014/12/11