diff --git a/disk/qcow.c b/disk/qcow.c index 64a2550..e26c419 100644 --- a/disk/qcow.c +++ b/disk/qcow.c @@ -1203,7 +1203,7 @@ static int qcow_read_refcount_table(struct qcow *q) if (!rft->rf_table) return -1; - rft->root = RB_ROOT; + rft->root = (struct rb_root) RB_ROOT; INIT_LIST_HEAD(&rft->lru_list); return pread_in_full(q->fd, rft->rf_table, sizeof(u64) * rft->rf_size, header->refcount_table_offset); @@ -1289,7 +1289,7 @@ static struct disk_image *qcow2_probe(int fd, bool readonly) l1t = &q->table; - l1t->root = RB_ROOT; + l1t->root = (struct rb_root) RB_ROOT; INIT_LIST_HEAD(&l1t->lru_list); h = q->header = qcow2_read_header(fd); @@ -1435,7 +1435,7 @@ static struct disk_image *qcow1_probe(int fd, bool readonly) l1t = &q->table; - l1t->root = RB_ROOT; + l1t->root = (struct rb_root)RB_ROOT; INIT_LIST_HEAD(&l1t->lru_list); h = q->header = qcow1_read_header(fd); diff --git a/include/kvm/mutex.h b/include/kvm/mutex.h index a90584b..1f7d0f6 100644 --- a/include/kvm/mutex.h +++ b/include/kvm/mutex.h @@ -13,7 +13,7 @@ struct mutex { pthread_mutex_t mutex; }; -#define MUTEX_INITIALIZER (struct mutex) { .mutex = PTHREAD_MUTEX_INITIALIZER } +#define MUTEX_INITIALIZER { .mutex = PTHREAD_MUTEX_INITIALIZER } #define DEFINE_MUTEX(mtx) struct mutex mtx = MUTEX_INITIALIZER diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index fb31765..33adf78 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h @@ -46,7 +46,7 @@ struct rb_root { #define rb_parent(r) ((struct rb_node *)((r)->__rb_parent_color & ~3)) -#define RB_ROOT (struct rb_root) { NULL, } +#define RB_ROOT { NULL, } #define rb_entry(ptr, type, member) container_of(ptr, type, member) #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) diff --git a/virtio/9p.c b/virtio/9p.c index 66dcc26..49e7c5c 100644 --- a/virtio/9p.c +++ b/virtio/9p.c @@ -1320,7 +1320,7 @@ static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) return size; } -struct virtio_ops p9_dev_virtio_ops = (struct virtio_ops) { +struct virtio_ops p9_dev_virtio_ops = { .get_config = get_config, .get_host_features = get_host_features, .set_guest_features = set_guest_features, diff --git a/virtio/balloon.c b/virtio/balloon.c index 84c4bb0..9564aa3 100644 --- a/virtio/balloon.c +++ b/virtio/balloon.c @@ -239,7 +239,7 @@ static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) return size; } -struct virtio_ops bln_dev_virtio_ops = (struct virtio_ops) { +struct virtio_ops bln_dev_virtio_ops = { .get_config = get_config, .get_host_features = get_host_features, .set_guest_features = set_guest_features, diff --git a/virtio/blk.c b/virtio/blk.c index edfa8e6..c485e4f 100644 --- a/virtio/blk.c +++ b/virtio/blk.c @@ -244,7 +244,7 @@ static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) return size; } -static struct virtio_ops blk_dev_virtio_ops = (struct virtio_ops) { +static struct virtio_ops blk_dev_virtio_ops = { .get_config = get_config, .get_host_features = get_host_features, .set_guest_features = set_guest_features, diff --git a/virtio/console.c b/virtio/console.c index 384eac1..f1c0a19 100644 --- a/virtio/console.c +++ b/virtio/console.c @@ -197,7 +197,7 @@ static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) return size; } -static struct virtio_ops con_dev_virtio_ops = (struct virtio_ops) { +static struct virtio_ops con_dev_virtio_ops = { .get_config = get_config, .get_host_features = get_host_features, .set_guest_features = set_guest_features, diff --git a/virtio/net.c b/virtio/net.c index 9784520..4a6a855 100644 --- a/virtio/net.c +++ b/virtio/net.c @@ -624,7 +624,7 @@ static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) return size; } -static struct virtio_ops net_dev_virtio_ops = (struct virtio_ops) { +static struct virtio_ops net_dev_virtio_ops = { .get_config = get_config, .get_host_features = get_host_features, .set_guest_features = set_guest_features, diff --git a/virtio/rng.c b/virtio/rng.c index 8031368..9b9e128 100644 --- a/virtio/rng.c +++ b/virtio/rng.c @@ -141,7 +141,7 @@ static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) return size; } -static struct virtio_ops rng_dev_virtio_ops = (struct virtio_ops) { +static struct virtio_ops rng_dev_virtio_ops = { .get_config = get_config, .get_host_features = get_host_features, .set_guest_features = set_guest_features, diff --git a/virtio/scsi.c b/virtio/scsi.c index be254f3..58d2353 100644 --- a/virtio/scsi.c +++ b/virtio/scsi.c @@ -167,7 +167,7 @@ static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) return size; } -static struct virtio_ops scsi_dev_virtio_ops = (struct virtio_ops) { +static struct virtio_ops scsi_dev_virtio_ops = { .get_config = get_config, .get_host_features = get_host_features, .set_guest_features = set_guest_features,