mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
virtio: use u32, not bitmap for features
It seemed like a good idea to use bitmap for features in struct virtio_device, but it's actually a pain, and seems to become even more painful when we get more than 32 feature bits. Just change it to a u32 for now. Based on patch by Rusty. Suggested-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
@@ -101,8 +101,7 @@ struct virtio_device {
|
||||
const struct virtio_config_ops *config;
|
||||
const struct vringh_config_ops *vringh_config;
|
||||
struct list_head vqs;
|
||||
/* Note that this is a Linux set_bit-style bitmap. */
|
||||
unsigned long features[1];
|
||||
u32 features;
|
||||
void *priv;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user