]> Git Repo - qemu.git/commit - hw/char/virtio-serial-bus.c
virtio: feature bit manipulation helpers
authorCornelia Huck <[email protected]>
Thu, 11 Dec 2014 13:25:05 +0000 (14:25 +0100)
committerMichael S. Tsirkin <[email protected]>
Thu, 26 Feb 2015 12:04:07 +0000 (13:04 +0100)
commit0cd09c3a6cc2230ba38c462fc410b4acce59eb6f
tree34ac356869acdd46eb089d491b3ee4b2240dac88
parenta590fd5ba8f01724eee169f097f65603f0c3a8f8
virtio: feature bit manipulation helpers

Add virtio_{add,clear}_feature helper functions for manipulating a
feature bits variable. This has some benefits over open coding:
- add check that the bit is in a sane range
- make it obvious at a glance what is going on
- have a central point to change when we want to extend feature bits

Convert existing code manipulating features to use the new helpers.

Signed-off-by: Cornelia Huck <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/9pfs/virtio-9p-device.c
hw/block/virtio-blk.c
hw/char/virtio-serial-bus.c
hw/net/virtio-net.c
hw/s390x/virtio-ccw.c
hw/virtio/virtio-mmio.c
hw/virtio/virtio-pci.c
include/hw/virtio/virtio.h
This page took 0.030132 seconds and 4 git commands to generate.