Add checks to the check_offsets(void) for queue_notify_data and
queue_reset.

Signed-off-by: Xuan Zhuo <xuanz...@linux.alibaba.com>
---
 drivers/virtio/virtio_pci_modern_dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/virtio/virtio_pci_modern_dev.c 
b/drivers/virtio/virtio_pci_modern_dev.c
index ef6667de1b38..47cb41160e1a 100644
--- a/drivers/virtio/virtio_pci_modern_dev.c
+++ b/drivers/virtio/virtio_pci_modern_dev.c
@@ -203,6 +203,10 @@ static inline void check_offsets(void)
                     offsetof(struct virtio_pci_common_cfg, queue_used_lo));
        BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_USEDHI !=
                     offsetof(struct virtio_pci_common_cfg, queue_used_hi));
+       BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_NDATA !=
+                    offsetof(struct virtio_pci_modern_common_cfg, 
queue_notify_data));
+       BUILD_BUG_ON(VIRTIO_PCI_COMMON_Q_RESET !=
+                    offsetof(struct virtio_pci_modern_common_cfg, 
queue_reset));
 }
 
 /*
-- 
2.32.0.3.g01195cf9f

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to