qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 01/10] hw/virtio/:split some lines containing more than 80 charac


From: Gan Qixin
Subject: [PATCH 01/10] hw/virtio/:split some lines containing more than 80 characters
Date: Tue, 20 Oct 2020 04:30:14 +0800

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(-)

diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index 88c8ecc9e0..588a1f64fe 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -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);
 }
diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c
index 1bc5d03a00..a17a5ac236 100644
--- a/hw/virtio/vhost-user-fs.c
+++ b/hw/virtio/vhost-user-fs.c
@@ -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 */
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 9c5b4f7fbc..a3134cd07b 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -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;
             }
 
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index b22b5beda3..c10aa16cf0 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -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();
                 }
diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
index d6332d45c3..66f8ab0baf 100644
--- a/hw/virtio/virtio-bus.c
+++ b/hw/virtio/virtio-bus.c
@@ -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;
         }
     }
diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c
index 54f9bbb789..6d3616ea98 100644
--- a/hw/virtio/virtio-crypto.c
+++ b/hw/virtio/virtio-crypto.c
@@ -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;
     }
 
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 36524a5728..de6704f8c7 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -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,
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 06e2af12de..d9049c2c44 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -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;
     /*
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 2886c0ce2a..9515ce87de 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -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(),
 };
 
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 6f8f865aff..66c5011748 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -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(),
-- 
2.23.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]