qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	qemu-block@nongnu.org, David Hildenbrand <david@redhat.com>,
	libvir-list@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>, John Snow <jsnow@redhat.com>
Subject: [PATCH 4/4] hw/usb/bus: Remove the "full-path" property
Date: Wed,  3 Feb 2021 18:18:32 +0100	[thread overview]
Message-ID: <20210203171832.483176-5-thuth@redhat.com> (raw)
In-Reply-To: <20210203171832.483176-1-thuth@redhat.com>

This property was only required for the pc-1.0 and earlier machine
types. Since these have been removed now, we can delete the property
as well.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/usb/bus.c     | 7 +------
 include/hw/usb.h | 2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 064f94e9c3..df7411fea8 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -19,8 +19,6 @@ static void usb_qdev_unrealize(DeviceState *qdev);
 static Property usb_props[] = {
     DEFINE_PROP_STRING("port", USBDevice, port_path),
     DEFINE_PROP_STRING("serial", USBDevice, serial),
-    DEFINE_PROP_BIT("full-path", USBDevice, flags,
-                    USB_DEV_FLAG_FULL_PATH, true),
     DEFINE_PROP_BIT("msos-desc", USBDevice, flags,
                     USB_DEV_FLAG_MSOS_DESC_ENABLE, true),
     DEFINE_PROP_STRING("pcap", USBDevice, pcap_filename),
@@ -596,11 +594,8 @@ static char *usb_get_dev_path(DeviceState *qdev)
 {
     USBDevice *dev = USB_DEVICE(qdev);
     DeviceState *hcd = qdev->parent_bus->parent;
-    char *id = NULL;
+    char *id = qdev_get_dev_path(hcd);
 
-    if (dev->flags & (1 << USB_DEV_FLAG_FULL_PATH)) {
-        id = qdev_get_dev_path(hcd);
-    }
     if (id) {
         char *ret = g_strdup_printf("%s/%s", id, dev->port->path);
         g_free(id);
diff --git a/include/hw/usb.h b/include/hw/usb.h
index abfbfc5284..c44b77dae0 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -216,7 +216,7 @@ struct USBEndpoint {
 };
 
 enum USBDeviceFlags {
-    USB_DEV_FLAG_FULL_PATH,
+    USB_DEV_FLAG_FULL_PATH,             /* unused since QEMU v6.0 */
     USB_DEV_FLAG_IS_HOST,
     USB_DEV_FLAG_MSOS_DESC_ENABLE,
     USB_DEV_FLAG_MSOS_DESC_IN_USE,
-- 
2.27.0



  parent reply	other threads:[~2021-02-03 17:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 17:18 [PATCH 0/4] Remove the deprecated pc-1.x machine types and related stuff Thomas Huth
2021-02-03 17:18 ` [PATCH 1/4] hw/i386: Remove the deprecated pc-1.x machine types Thomas Huth
2021-02-03 17:37   ` Daniel P. Berrangé
2021-02-03 17:18 ` [PATCH 2/4] hw/block/fdc: Remove the check_media_rate property Thomas Huth
2021-02-05  0:40   ` John Snow
2021-02-05  6:37     ` Thomas Huth
2021-02-05 20:15       ` John Snow
2021-02-08  7:05         ` Thomas Huth
2021-02-13 22:41           ` Laurent Vivier
2021-02-15 18:11             ` John Snow
2021-02-03 17:18 ` [PATCH 3/4] hw/virtio/virtio-balloon: Remove the "class" property Thomas Huth
2021-02-03 19:42   ` David Hildenbrand
2021-02-03 17:18 ` Thomas Huth [this message]
2021-02-04  8:36   ` [PATCH 4/4] hw/usb/bus: Remove the "full-path" property Gerd Hoffmann
2021-02-04 15:51     ` Thomas Huth
2021-02-05  9:09       ` Gerd Hoffmann
2021-02-05 11:00 ` [PATCH 0/4] Remove the deprecated pc-1.x machine types and related stuff Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210203171832.483176-5-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=david@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).