Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2231420/?format=api
{ "id": 2231420, "url": "http://patchwork.ozlabs.org/api/patches/2231420/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-21-pbonzini@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260430172204.1006673-21-pbonzini@redhat.com>", "list_archive_url": null, "date": "2026-04-30T17:21:26", "name": "[PULL,20/58] hw/qdev: Consolidate qdev_get_printable_name() into qdev_get_human_name()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9f771a7eab2161aeebc3eefba301f2b025015f81", "submitter": { "id": 2701, "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api", "name": "Paolo Bonzini", "email": "pbonzini@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-21-pbonzini@redhat.com/mbox/", "series": [ { "id": 502347, "url": "http://patchwork.ozlabs.org/api/series/502347/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502347", "date": "2026-04-30T17:21:16", "name": "[PULL,01/58] pythondeps: bump to meson 1.11.1", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502347/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2231420/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2231420/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=AnfXA3wI;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=b7zDXCA/;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g61J86r5zz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 03:24:40 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIV6e-00051V-1F; Thu, 30 Apr 2026 13:23:20 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV6b-0004xw-MF\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:23:17 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV6Z-0004UR-LQ\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:23:17 -0400", "from mail-qt1-f198.google.com (mail-qt1-f198.google.com\n [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-629-FqNJl0rsOPuFsZ4xemR_hA-1; Thu, 30 Apr 2026 13:23:13 -0400", "by mail-qt1-f198.google.com with SMTP id\n d75a77b69052e-50d8e8c47a3so30210581cf.0\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 10:23:13 -0700 (PDT)", "from [192.168.10.48] ([151.49.85.67])\n by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-5103d1c6fc4sm586791cf.4.2026.04.30.10.23.09\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Apr 2026 10:23:10 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777569794;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=BwI+DAdyJ/kfQ/N20b98sd9/hfTGkbU6Agp12ufe4Oo=;\n b=AnfXA3wIcNEwowo4xB2FHT8Anmp5hrOmdY9W4jwgXEOXuluMhWE48m8s9awIj154YoOqYd\n gSa+hxGbRGQYgcOWzFHvo1FvtMAn9anP8DS8Sb8BnPaFH7nnBFq6XlVuAtj37N83E8pA0+\n tSsCsosXK2xpNkmQa7PrHJnY7o1UFIw=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1777569792; x=1778174592; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=BwI+DAdyJ/kfQ/N20b98sd9/hfTGkbU6Agp12ufe4Oo=;\n b=b7zDXCA/BSqffM+6WLZtrd79nIsna6faJFrWU4dA/QK8Q2p8JLF0vDO7nILCMuQXCZ\n EauTDpPX+p+dwgG/kZwyeJfCW6CZfSAk3y5UjV8V0FahhtF8TK3/Iluahliwy9t+I5+U\n 5gD+ik6lG46Ef5sqmEgReuX6hoYjzgWXFP/bKtSfNeIC5PCbupkg6bOgAGrly2gGmhiD\n y3PrJYE/PC1fqb8Rx6KvWnVbYUruI/cgW9bQ9J5EpXdXCXeytZ0bNL6U9HEF6/QvkEdH\n P4ZrA3n8XRPnjBC7nXFuNbo1x1daFyNiGGyIff+gbqOIoKUkYl2/e6JlTm9Vn18uUFvg\n 8tBw==" ], "X-MC-Unique": "FqNJl0rsOPuFsZ4xemR_hA-1", "X-Mimecast-MFC-AGG-ID": "FqNJl0rsOPuFsZ4xemR_hA_1777569793", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777569792; x=1778174592;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=BwI+DAdyJ/kfQ/N20b98sd9/hfTGkbU6Agp12ufe4Oo=;\n b=A6K5Zuy0G71JphNwZRtdvk6mYNdpak5A8KKaStWj8fOfO+7qhD+ZfUvBmyNiR4zCHx\n 58fFm13cJS9diikBbqGTQXHy+mcdMx7h53H8upX5an+oGOOTnUAnkChP+kBgICBRjYaC\n G/JJjInWzft26KX80WnOb6vT12jUrmXU2L5Kww4I8ebsGQl3y/7e80XQpvQRJbK2VVpT\n MDUImQcsrcZgVq+U6yvIrmtZIL6kK09HWVxdwHOWOt8Wyw6siVOfHegyQSTX08RAzuh6\n ZuCScaisuqmhO2STlAcXL/uXH6ezq57zgSklQcXPW+vUmyPCe18Wegk0cyhAxN3JGBFI\n Iasg==", "X-Gm-Message-State": "AOJu0YzqjE6TzINIIBGTSEVDKN3Fva6XH5mktHV5c2YIaKiQS3Z/bhF0\n AYwP37Ev+S1kioYg4XovEamOx+4FmkPYd/A6aruVwU061HOI8xDmoYGbi6iXQwy2I7o8SFGcFm4\n /FTN3r6XEEA1SdGIRan3KwosWzcNP77U7Rj2g4fnGteTLgJZ7Ka3kPb3ZSF0nGgoVvo82Rqm3G1\n yT2y4xA6u3DGvXbJGAKtSENpHTv/5vPVvQdB/ATA2P", "X-Gm-Gg": "AeBDies5htAl0xBpg47XYMwO0GdoFMjO9B32EouaoGKHLfLxdmf1wU561xkiFpXDiQd\n NO9RyMF4PI1MuWTVWA/mCdSZ3Go3EiiXgx8L1RIQsMxf28QL/DLANvbBhxWCSMExzSmeQMBmD3E\n Pxc1s3S2razBLOyWyDx1oG9ayvUMDJYszZ+WIdl5gZ/PiOfV0t8r2nNasmI6/k5jG3GNLDhvxO4\n GWGoC2inZwRhA73HxMhcZ4P3ZOFaKAbL7VSfl4OvcY3tYRcOgSbfucT++tyBXbTclmPPUfN7Jtc\n OaSSLxZmeUDsoOpEsIRsYZN4iPzcXEUXYPG4GFL1PR0falDwo9QkgTKCPIbRsXV2xQWGFn/SjTO\n ZfMjyvxyVZ4aTIHw3NxXEfZp++aU5dZJYIm7Fb9z6ZYFp2VACCvdxRea3r6ZxGefBTR424wewOe\n 56Zd/AWAGxqjABHXex7BzakiC4a7E/JPk9gdQ=", "X-Received": [ "by 2002:a05:622a:2594:b0:50d:2a76:43c5 with SMTP id\n d75a77b69052e-5102aaf886cmr55753081cf.2.1777569792321;\n Thu, 30 Apr 2026 10:23:12 -0700 (PDT)", "by 2002:a05:622a:2594:b0:50d:2a76:43c5 with SMTP id\n d75a77b69052e-5102aaf886cmr55751941cf.2.1777569791438;\n Thu, 30 Apr 2026 10:23:11 -0700 (PDT)" ], "From": "Paolo Bonzini <pbonzini@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Alessandro Ratti <alessandro@0x65c.net>,\n Peter Maydell <peter.maydell@linaro.org>,\n Markus Armbruster <armbru@redhat.com>", "Subject": "[PULL 20/58] hw/qdev: Consolidate qdev_get_printable_name() into\n qdev_get_human_name()", "Date": "Thu, 30 Apr 2026 19:21:26 +0200", "Message-ID": "<20260430172204.1006673-21-pbonzini@redhat.com>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260430172204.1006673-1-pbonzini@redhat.com>", "References": "<20260430172204.1006673-1-pbonzini@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n 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.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Alessandro Ratti <alessandro@0x65c.net>\n\nRename qdev_get_printable_name() to qdev_get_human_name(), remove\nthe old qdev_get_human_name() implementation, and switch the three\nqdev_get_printable_name() callers in hw/virtio/virtio.c.\n\nqdev_get_printable_name() subsumes qdev_get_human_name(): both\nreturn the device ID when set and fall back to the canonical QOM\npath, but qdev_get_printable_name() also tries the bus-specific\npath first, providing more informative output.\n\nSuggested-by: Peter Maydell <peter.maydell@linaro.org>\nSigned-off-by: Alessandro Ratti <alessandro@0x65c.net>\nReviewed-by: Markus Armbruster <armbru@redhat.com>\nLink: https://lore.kernel.org/r/20260321100405.1525059-4-alessandro@0x65c.net\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n include/hw/core/qdev.h | 26 +++++---------------------\n hw/core/qdev.c | 10 +---------\n hw/virtio/virtio.c | 6 +++---\n 3 files changed, 9 insertions(+), 33 deletions(-)", "diff": "diff --git a/include/hw/core/qdev.h b/include/hw/core/qdev.h\nindex 226bd662901..e1476223411 100644\n--- a/include/hw/core/qdev.h\n+++ b/include/hw/core/qdev.h\n@@ -1022,13 +1022,12 @@ Object *machine_get_container(const char *name);\n * qdev_get_human_name() - Return a human-readable name for a device\n * @dev: The device. Must be a valid and non-NULL pointer.\n *\n- * .. note::\n- * This function is intended for user friendly error messages.\n+ * Returns: A newly allocated string suitable for user-facing error\n+ * messages.\n *\n- * Returns: A newly allocated string containing the device id if not null,\n- * else the object canonical path.\n- *\n- * Use g_free() to free it.\n+ * Return the device's ID if it has one. Else, return the path of a\n+ * device on its bus if it has one. Else return its canonical QOM\n+ * path.\n */\n char *qdev_get_human_name(DeviceState *dev);\n \n@@ -1058,21 +1057,6 @@ extern bool qdev_hot_removed;\n */\n char *qdev_get_dev_path(DeviceState *dev);\n \n-/**\n- * qdev_get_printable_name: Return human readable name for device\n- * @dev: Device to get name of\n- *\n- * Returns: A newly allocated string containing some human\n- * readable name for the device, suitable for printing in\n- * user-facing error messages. The function will never return NULL,\n- * so the name can be used without further checking or fallbacks.\n- *\n- * Return the device's ID if it has one. Else, return the path of a\n- * device on its bus if it has one. Else return its canonical QOM\n- * path.\n- */\n-const char *qdev_get_printable_name(DeviceState *dev);\n-\n void qbus_set_hotplug_handler(BusState *bus, Object *handler);\n void qbus_set_bus_hotplug_handler(BusState *bus);\n \ndiff --git a/hw/core/qdev.c b/hw/core/qdev.c\nindex 0efc83f6740..e2aab3d1fc6 100644\n--- a/hw/core/qdev.c\n+++ b/hw/core/qdev.c\n@@ -412,7 +412,7 @@ char *qdev_get_dev_path(DeviceState *dev)\n return NULL;\n }\n \n-const char *qdev_get_printable_name(DeviceState *dev)\n+char *qdev_get_human_name(DeviceState *dev)\n {\n if (dev->id) {\n return g_strdup(dev->id);\n@@ -858,14 +858,6 @@ Object *machine_get_container(const char *name)\n return container;\n }\n \n-char *qdev_get_human_name(DeviceState *dev)\n-{\n- g_assert(dev != NULL);\n-\n- return dev->id ?\n- g_strdup(dev->id) : object_get_canonical_path(OBJECT(dev));\n-}\n-\n static MachineInitPhase machine_phase;\n \n bool phase_check(MachineInitPhase phase)\ndiff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c\nindex 8fcf6cfd0b4..63e2faee994 100644\n--- a/hw/virtio/virtio.c\n+++ b/hw/virtio/virtio.c\n@@ -281,7 +281,7 @@ void virtio_init_region_cache(VirtIODevice *vdev, int n)\n len = address_space_cache_init(&new->desc, vdev->dma_as,\n addr, size, packed);\n if (len < size) {\n- g_autofree const char *devname = qdev_get_printable_name(DEVICE(vdev));\n+ g_autofree char *devname = qdev_get_human_name(DEVICE(vdev));\n \n virtio_error(vdev,\n \"Failed to map descriptor ring for device %s: \"\n@@ -294,7 +294,7 @@ void virtio_init_region_cache(VirtIODevice *vdev, int n)\n len = address_space_cache_init(&new->used, vdev->dma_as,\n vq->vring.used, size, true);\n if (len < size) {\n- g_autofree const char *devname = qdev_get_printable_name(DEVICE(vdev));\n+ g_autofree char *devname = qdev_get_human_name(DEVICE(vdev));\n \n virtio_error(vdev,\n \"Failed to map used ring for device %s: \"\n@@ -307,7 +307,7 @@ void virtio_init_region_cache(VirtIODevice *vdev, int n)\n len = address_space_cache_init(&new->avail, vdev->dma_as,\n vq->vring.avail, size, false);\n if (len < size) {\n- g_autofree const char *devname = qdev_get_printable_name(DEVICE(vdev));\n+ g_autofree char *devname = qdev_get_human_name(DEVICE(vdev));\n \n virtio_error(vdev,\n \"Failed to map avalaible ring for device %s: \"\n", "prefixes": [ "PULL", "20/58" ] }