From nobody Tue Feb 10 03:38:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1603191944; cv=none; d=zohomail.com; s=zohoarc; b=h+r5feNpJc5x6iSVoUOJ48IBZwizZF46MCrrWHYzFvds9d4ZUfBTAhI+YHJ3mKmc+jHA/Wu53dcSDsjguJbUGUkOY9zixm7vnsATJ2KqZwJUwz+ESWCoF3JjEATG4lxf0kkybxjC2Jsud6rgr2bvyXrHEw3i83sdYYLwGHHotZg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603191944; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=njpCg+c3Yfpyeat1e0Oy4iy2XZ0gC7Jw5rr5lEbcSQk=; b=YgT3/qIRZP32hFFWiOdPSNgG4/XwFECR8FYWAA1WBTb269opTLwlZxlQKZHatQ0Suf3DhvVIov8CAoYZ11qj+SLTm6KFyJZ0AGnDVC4NYfiA2knKAHK1EjuvuZ/AAIsMYaGQ3NxajjJDZrw9tFBpQj+k/3WFS4Fag4NqJAhGeBY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603191944101822.6188724924447; Tue, 20 Oct 2020 04:05:44 -0700 (PDT) Received: from localhost ([::1]:60390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUpSY-0007lu-W2 for importer@patchew.org; Tue, 20 Oct 2020 07:05:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUpQs-00060E-5j; Tue, 20 Oct 2020 07:03:58 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:38448 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUpQo-0006lj-81; Tue, 20 Oct 2020 07:03:57 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 892D5F5F9B0A65AD92F4; Tue, 20 Oct 2020 19:03:44 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Tue, 20 Oct 2020 19:03:37 +0800 From: Gan Qixin To: , Subject: [PATCH 01/10] hw/virtio/:split some lines containing more than 80 characters Date: Tue, 20 Oct 2020 04:30:14 +0800 Message-ID: <20201019203023.658555-2-ganqixin@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201019203023.658555-1-ganqixin@huawei.com> References: <20201019203023.658555-1-ganqixin@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.35; envelope-from=ganqixin@huawei.com; helo=huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 07:03:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, peter.maydell@linaro.org, zhang.zhanghailiang@huawei.com, mst@redhat.com, f4bug@amsat.org, alistair.francis@wdc.com, Gan Qixin , kuhn.chenqun@huawei.com, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 --- 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); } =20 -static int vhost_kernel_scsi_get_abi_version(struct vhost_dev *dev, int *v= ersion) +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, Erro= r **errp) sizeof(struct virtio_fs_config)); =20 /* Hiprio queue */ - fs->hiprio_vq =3D virtio_add_queue(vdev, fs->conf.queue_size, vuf_hand= le_output); + fs->hiprio_vq =3D virtio_add_queue(vdev, fs->conf.queue_size, + vuf_handle_output); =20 /* Request queues */ fs->req_vqs =3D g_new(VirtQueue *, fs->conf.num_request_queues); for (i =3D 0; i < fs->conf.num_request_queues; i++) { - fs->req_vqs[i] =3D virtio_add_queue(vdev, fs->conf.queue_size, vuf= _handle_output); + fs->req_vqs[i] =3D virtio_add_queue(vdev, fs->conf.queue_size, + vuf_handle_output); } =20 /* 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_gp= a, dev->mem->regions[reg_idx].guest_phys_add= r); return -1; } @@ -1872,9 +1872,9 @@ static int vhost_user_backend_init(struct vhost_dev *= dev, void *opaque) =20 if (ram_slots < u->user->memory_slots) { error_report("The backend specified a max ram slots limit " - "of %" PRIu64", when the prior validated limi= t was %d. " - "This limit should never decrease.", ram_slot= s, - u->user->memory_slots); + "of %" PRIu64", when the prior validated limi= t " + "was %d. This limit should never decrease.", + ram_slots, u->user->memory_slots); return -1; } =20 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) =20 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); } =20 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, &pb= p); } else if (vq =3D=3D s->dvq) { - balloon_deflate_page(s, section.mr, section.offset_wit= hin_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 =3D 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 *d= ev, 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->con= f.cryptodev))); + object_get_canonical_path_component( + OBJECT(vcrypto->conf.cryptodev))); return; } =20 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) } =20 static Property virtio_pci_properties[] =3D { - 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, f= alse), 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=3Dauto, (non-)transitional mode is selected * depending on the bus where the device is plugged. * - * Implements both INTERFACE_PCIE_DEVICE and INTERFACE_CONVENTIONAL_PC= I_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 onl= y 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_PC= I_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[] =3D { */ 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, RngBack= end *), + DEFINE_PROP_LINK("rng", VirtIORNG, conf.rng, TYPE_RNG_BACKEND, + RngBackend *), DEFINE_PROP_END_OF_LIST(), }; =20 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; } =20 - vq->shadow_avail_idx =3D virtio_lduw_phys_cached(vq->vdev, &caches->av= ail, pa); + vq->shadow_avail_idx =3D virtio_lduw_phys_cached(vq->vdev, + &caches->avail, pa); return vq->shadow_avail_idx; } =20 @@ -1065,7 +1066,8 @@ static void virtqueue_split_get_avail_bytes(VirtQueue= *vq, goto done; } =20 - rc =3D virtqueue_split_read_next_desc(vdev, &desc, desc_cache,= max, &i); + rc =3D virtqueue_split_read_next_desc(vdev, &desc, + desc_cache, max, &i); } while (rc =3D=3D VIRTQUEUE_READ_DESC_MORE); =20 if (rc =3D=3D VIRTQUEUE_READ_DESC_ERROR) { @@ -1388,7 +1390,8 @@ void virtqueue_map(VirtIODevice *vdev, VirtQueueEleme= nt *elem) fa= lse); } =20 -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 =3D QEMU_ALIGN_UP(sz, __alignof__(elem->in_addr[0])= ); @@ -3558,7 +3561,7 @@ static void virtio_queue_host_notifier_aio_poll_end(E= ventNotifier *n) } =20 void virtio_queue_aio_set_host_notifier_handler(VirtQueue *vq, AioContext = *ctx, - VirtIOHandleAIOOutput hand= le_output) + VirtIOHandleAIOOutput handle_o= utput) { if (handle_output) { vq->handle_aio_output =3D handle_output; @@ -3716,7 +3719,8 @@ static void virtio_device_instance_finalize(Object *o= bj) static Property virtio_properties[] =3D { 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(), --=20 2.23.0