diff options
author | Max Reitz <mreitz@redhat.com> | 2019-10-11 17:27:59 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-10-28 11:51:07 +0100 |
commit | 5d5b33c08031cfe0e9872bde1f9dcb2215f9b30a (patch) | |
tree | 81d3c7251d852c110533f297e500a5b238547a7e /include/hw/virtio | |
parent | f93c3add3a773e0e3f6277e5517583c4ad3a43c2 (diff) |
include: Move endof() up from hw/virtio/virtio.h
endof() is a useful macro, we can make use of it outside of virtio.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20191011152814.14791-2-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/hw/virtio')
-rw-r--r-- | include/hw/virtio/virtio.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 48e8d04ff6..ef083af550 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -37,13 +37,6 @@ static inline hwaddr vring_align(hwaddr addr, return QEMU_ALIGN_UP(addr, align); } -/* - * Calculate the number of bytes up to and including the given 'field' of - * 'container'. - */ -#define virtio_endof(container, field) \ - (offsetof(container, field) + sizeof_field(container, field)) - typedef struct VirtIOFeature { uint64_t flags; size_t end; |