qemu-devel
[Top][All Lists]
Advanced

[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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]