[PATCH RFC v4 3/5] virtio: pack config changed flags
From: Michael S. Tsirkin
Date: Thu Jul 03 2025 - 05:27:27 EST
In anticipation of adding more, use bit-fields instead of bool.
Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
---
include/linux/virtio.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 64cb4b04be7a..be0beb16b487 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -149,9 +149,9 @@ struct virtio_admin_cmd {
struct virtio_device {
int index;
bool failed;
- bool config_core_enabled;
- bool config_driver_disabled;
- bool config_change_pending;
+ u8 config_core_enabled:1;
+ u8 config_driver_disabled:1;
+ u8 config_change_pending:1;
spinlock_t config_lock;
spinlock_t vqs_list_lock;
struct device dev;
--
MST