mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
virtio: avoid leading underscores for helpers
Commit ef546f1275
("virtio: add
feature checking helpers") introduced a helper __virtio_has_feature.
We don't want to use reserved identifiers, though, so let's
rename __virtio_has_feature to virtio_has_feature and virtio_has_feature
to virtio_vdev_has_feature.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
91176e3105
commit
95129d6fc9
11 changed files with 48 additions and 45 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
static inline bool virtio_access_is_big_endian(VirtIODevice *vdev)
|
||||
{
|
||||
if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
|
||||
if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
|
||||
/* Devices conforming to VIRTIO 1.0 or later are always LE. */
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -261,26 +261,27 @@ static inline void virtio_clear_feature(uint64_t *features, unsigned int fbit)
|
|||
*features &= ~(1ULL << fbit);
|
||||
}
|
||||
|
||||
static inline bool __virtio_has_feature(uint64_t features, unsigned int fbit)
|
||||
static inline bool virtio_has_feature(uint64_t features, unsigned int fbit)
|
||||
{
|
||||
assert(fbit < 64);
|
||||
return !!(features & (1ULL << fbit));
|
||||
}
|
||||
|
||||
static inline bool virtio_has_feature(VirtIODevice *vdev, unsigned int fbit)
|
||||
static inline bool virtio_vdev_has_feature(VirtIODevice *vdev,
|
||||
unsigned int fbit)
|
||||
{
|
||||
return __virtio_has_feature(vdev->guest_features, fbit);
|
||||
return virtio_has_feature(vdev->guest_features, fbit);
|
||||
}
|
||||
|
||||
static inline bool virtio_host_has_feature(VirtIODevice *vdev,
|
||||
unsigned int fbit)
|
||||
{
|
||||
return __virtio_has_feature(vdev->host_features, fbit);
|
||||
return virtio_has_feature(vdev->host_features, fbit);
|
||||
}
|
||||
|
||||
static inline bool virtio_is_big_endian(VirtIODevice *vdev)
|
||||
{
|
||||
if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
|
||||
if (!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
|
||||
assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN);
|
||||
return vdev->device_endian == VIRTIO_DEVICE_ENDIAN_BIG;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue