From 5d5b33c08031cfe0e9872bde1f9dcb2215f9b30a Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Fri, 11 Oct 2019 17:27:59 +0200 Subject: 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 Reviewed-by: Eric Blake Message-id: 20191011152814.14791-2-mreitz@redhat.com Signed-off-by: Max Reitz --- hw/net/virtio-net.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/net') diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9f11422..2c4909c 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -90,15 +90,15 @@ static inline __virtio16 *virtio_net_rsc_ext_num_dupacks( static VirtIOFeature feature_sizes[] = { {.flags = 1ULL << VIRTIO_NET_F_MAC, - .end = virtio_endof(struct virtio_net_config, mac)}, + .end = endof(struct virtio_net_config, mac)}, {.flags = 1ULL << VIRTIO_NET_F_STATUS, - .end = virtio_endof(struct virtio_net_config, status)}, + .end = endof(struct virtio_net_config, status)}, {.flags = 1ULL << VIRTIO_NET_F_MQ, - .end = virtio_endof(struct virtio_net_config, max_virtqueue_pairs)}, + .end = endof(struct virtio_net_config, max_virtqueue_pairs)}, {.flags = 1ULL << VIRTIO_NET_F_MTU, - .end = virtio_endof(struct virtio_net_config, mtu)}, + .end = endof(struct virtio_net_config, mtu)}, {.flags = 1ULL << VIRTIO_NET_F_SPEED_DUPLEX, - .end = virtio_endof(struct virtio_net_config, duplex)}, + .end = endof(struct virtio_net_config, duplex)}, {} }; -- cgit v1.1