@@ -85,7 +85,8 @@ static int vhost_kernel_scsi_clear_endpoint(struct vhost_dev *dev,
return vhost_kernel_call(dev, VHOST_SCSI_CLEAR_ENDPOINT, target);
}
-static int vhost_kernel_scsi_get_abi_version(struct vhost_dev *dev, int *version)
+static int vhost_kernel_scsi_get_abi_version(struct vhost_dev *dev,
+ int *version)
{
return vhost_kernel_call(dev, VHOST_SCSI_GET_ABI_VERSION, version);
}
@@ -209,12 +209,14 @@ static void vuf_device_realize(DeviceState *dev, Error **errp)
sizeof(struct virtio_fs_config));
/* Hiprio queue */
- fs->hiprio_vq = virtio_add_queue(vdev, fs->conf.queue_size, vuf_handle_output);
+ fs->hiprio_vq = virtio_add_queue(vdev, fs->conf.queue_size,
+ vuf_handle_output);
/* Request queues */
fs->req_vqs = g_new(VirtQueue *, fs->conf.num_request_queues);
for (i = 0; i < fs->conf.num_request_queues; i++) {
- fs->req_vqs[i] = virtio_add_queue(vdev, fs->conf.queue_size, vuf_handle_output);
+ fs->req_vqs[i] = virtio_add_queue(vdev, fs->conf.queue_size,
+ vuf_handle_output);
}
/* 1 high prio queue, plus the number configured */
@@ -755,8 +755,8 @@ static int send_add_regions(struct vhost_dev *dev,
reg_fd_idx, reg_idx);
} else {
error_report("%s: invalid postcopy reply for region. "
- "Got guest physical address %" PRIX64 ", expected "
- "%" PRIX64, __func__, reply_gpa,
+ "Got guest physical address %" PRIX64
+ ", expected %" PRIX64, __func__, reply_gpa,
dev->mem->regions[reg_idx].guest_phys_addr);
return -1;
}
@@ -1872,9 +1872,9 @@ static int vhost_user_backend_init(struct vhost_dev *dev, void *opaque)
if (ram_slots < u->user->memory_slots) {
error_report("The backend specified a max ram slots limit "
- "of %" PRIu64", when the prior validated limit was %d. "
- "This limit should never decrease.", ram_slots,
- u->user->memory_slots);
+ "of %" PRIu64", when the prior validated limit "
+ "was %d. This limit should never decrease.",
+ ram_slots, u->user->memory_slots);
return -1;
}
@@ -212,7 +212,8 @@ static void balloon_stats_destroy_timer(VirtIOBalloon *s)
static void balloon_stats_change_timer(VirtIOBalloon *s, int64_t secs)
{
- timer_mod(s->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + secs * 1000);
+ timer_mod(s->stats_timer,
+ qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + secs * 1000);
}
static void balloon_stats_poll_cb(void *opaque)
@@ -425,7 +426,8 @@ static void virtio_balloon_handle_output(VirtIODevice *vdev, VirtQueue *vq)
balloon_inflate_page(s, section.mr,
section.offset_within_region, &pbp);
} else if (vq == s->dvq) {
- balloon_deflate_page(s, section.mr, section.offset_within_region);
+ balloon_deflate_page(s, section.mr,
+ section.offset_within_region);
} else {
g_assert_not_reached();
}
@@ -221,7 +221,8 @@ int virtio_bus_start_ioeventfd(VirtioBusState *bus)
if (!bus->ioeventfd_grabbed) {
r = vdc->start_ioeventfd(vdev);
if (r < 0) {
- error_report("%s: failed. Fallback to userspace (slower).", __func__);
+ error_report("%s: failed. Fallback to userspace (slower).",
+ __func__);
return r;
}
}
@@ -798,7 +798,8 @@ static void virtio_crypto_device_realize(DeviceState *dev, Error **errp)
return;
} else if (cryptodev_backend_is_used(vcrypto->cryptodev)) {
error_setg(errp, "can't use already used cryptodev backend: %s",
- object_get_canonical_path_component(OBJECT(vcrypto->conf.cryptodev)));
+ object_get_canonical_path_component(
+ OBJECT(vcrypto->conf.cryptodev)));
return;
}
@@ -1887,8 +1887,8 @@ static void virtio_pci_reset(DeviceState *qdev)
}
static Property virtio_pci_properties[] = {
- DEFINE_PROP_BIT("virtio-pci-bus-master-bug-migration", VirtIOPCIProxy, flags,
- VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false),
+ DEFINE_PROP_BIT("virtio-pci-bus-master-bug-migration", VirtIOPCIProxy,
+ flags, VIRTIO_PCI_FLAG_BUS_MASTER_BUG_MIGRATION_BIT, false),
DEFINE_PROP_BIT("migrate-extra", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_MIGRATE_EXTRA_BIT, true),
DEFINE_PROP_BIT("modern-pio-notify", VirtIOPCIProxy, flags,
@@ -201,8 +201,9 @@ typedef struct VirtioPCIDeviceTypeInfo {
* If disable-legacy=auto, (non-)transitional mode is selected
* depending on the bus where the device is plugged.
*
- * Implements both INTERFACE_PCIE_DEVICE and INTERFACE_CONVENTIONAL_PCI_DEVICE,
- * but PCI Express is supported only in non-transitional mode.
+ * Implements both INTERFACE_PCIE_DEVICE and
+ * INTERFACE_CONVENTIONAL_PCI_DEVICE, but PCI Express is supported only in
+ * non-transitional mode.
*
* The only type implemented by QEMU 3.1 and older.
*/
@@ -210,7 +211,8 @@ typedef struct VirtioPCIDeviceTypeInfo {
/*
* The transitional device type. Optional.
*
- * Implements both INTERFACE_PCIE_DEVICE and INTERFACE_CONVENTIONAL_PCI_DEVICE.
+ * Implements both INTERFACE_PCIE_DEVICE and
+ * INTERFACE_CONVENTIONAL_PCI_DEVICE.
*/
const char *transitional_name;
/*
@@ -257,7 +257,8 @@ static Property virtio_rng_properties[] = {
*/
DEFINE_PROP_UINT64("max-bytes", VirtIORNG, conf.max_bytes, INT64_MAX),
DEFINE_PROP_UINT32("period", VirtIORNG, conf.period_ms, 1 << 16),
- DEFINE_PROP_LINK("rng", VirtIORNG, conf.rng, TYPE_RNG_BACKEND, RngBackend *),
+ DEFINE_PROP_LINK("rng", VirtIORNG, conf.rng, TYPE_RNG_BACKEND,
+ RngBackend *),
DEFINE_PROP_END_OF_LIST(),
};
@@ -309,7 +309,8 @@ static inline uint16_t vring_avail_idx(VirtQueue *vq)
return 0;
}
- vq->shadow_avail_idx = virtio_lduw_phys_cached(vq->vdev, &caches->avail, pa);
+ vq->shadow_avail_idx = virtio_lduw_phys_cached(vq->vdev,
+ &caches->avail, pa);
return vq->shadow_avail_idx;
}
@@ -1065,7 +1066,8 @@ static void virtqueue_split_get_avail_bytes(VirtQueue *vq,
goto done;
}
- rc = virtqueue_split_read_next_desc(vdev, &desc, desc_cache, max, &i);
+ rc = virtqueue_split_read_next_desc(vdev, &desc,
+ desc_cache, max, &i);
} while (rc == VIRTQUEUE_READ_DESC_MORE);
if (rc == VIRTQUEUE_READ_DESC_ERROR) {
@@ -1388,7 +1390,8 @@ void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem)
false);
}
-static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num)
+static void *virtqueue_alloc_element(size_t sz, unsigned out_num,
+ unsigned in_num)
{
VirtQueueElement *elem;
size_t in_addr_ofs = QEMU_ALIGN_UP(sz, __alignof__(elem->in_addr[0]));
@@ -3558,7 +3561,7 @@ static void virtio_queue_host_notifier_aio_poll_end(EventNotifier *n)
}
void virtio_queue_aio_set_host_notifier_handler(VirtQueue *vq, AioContext *ctx,
- VirtIOHandleAIOOutput handle_output)
+ VirtIOHandleAIOOutput handle_output)
{
if (handle_output) {
vq->handle_aio_output = handle_output;
@@ -3716,7 +3719,8 @@ static void virtio_device_instance_finalize(Object *obj)
static Property virtio_properties[] = {
DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features),
DEFINE_PROP_BOOL("use-started", VirtIODevice, use_started, true),
- DEFINE_PROP_BOOL("use-disabled-flag", VirtIODevice, use_disabled_flag, true),
+ DEFINE_PROP_BOOL("use-disabled-flag", VirtIODevice,
+ use_disabled_flag, true),
DEFINE_PROP_BOOL("x-disable-legacy-check", VirtIODevice,
disable_legacy_check, false),
DEFINE_PROP_END_OF_LIST(),
By using scripts/checkpatch.pl, it is found that many files in hw/virtio/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin <ganqixin@huawei.com> --- hw/virtio/vhost-backend.c | 3 ++- hw/virtio/vhost-user-fs.c | 6 ++++-- hw/virtio/vhost-user.c | 10 +++++----- hw/virtio/virtio-balloon.c | 6 ++++-- hw/virtio/virtio-bus.c | 3 ++- hw/virtio/virtio-crypto.c | 3 ++- hw/virtio/virtio-pci.c | 4 ++-- hw/virtio/virtio-pci.h | 8 +++++--- hw/virtio/virtio-rng.c | 3 ++- hw/virtio/virtio.c | 14 +++++++++----- 10 files changed, 37 insertions(+), 23 deletions(-)