Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1839939/?format=api
{ "id": 1839939, "url": "http://patchwork.ozlabs.org/api/patches/1839939/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20230926201532.221152-6-vsementsov@yandex-team.ru/", "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": "<20230926201532.221152-6-vsementsov@yandex-team.ru>", "list_archive_url": null, "date": "2023-09-26T20:15:29", "name": "[v2,5/8] pcie_sriov: unregister_vfs(): fix error path", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ea46e0749d62ba0300af2071a03d589a1a06a9fd", "submitter": { "id": 84116, "url": "http://patchwork.ozlabs.org/api/people/84116/?format=api", "name": "Vladimir Sementsov-Ogievskiy", "email": "vsementsov@yandex-team.ru" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20230926201532.221152-6-vsementsov@yandex-team.ru/mbox/", "series": [ { "id": 375000, "url": "http://patchwork.ozlabs.org/api/series/375000/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=375000", "date": "2023-09-26T20:15:27", "name": "coverity fixes", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/375000/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1839939/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1839939/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=yandex-team.ru header.i=@yandex-team.ru\n header.a=rsa-sha256 header.s=default header.b=Uvq89eCV;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)", "mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net;\n dkim=pass header.i=@yandex-team.ru" ], "Received": [ "from lists.gnu.org (lists.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 4Rw9yg1mLPz26jR\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 27 Sep 2023 06:17:30 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1qlETd-0000ZO-49; Tue, 26 Sep 2023 16:16:14 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vsementsov@yandex-team.ru>)\n id 1qlETY-0000X9-Gm\n for qemu-devel@nongnu.org; Tue, 26 Sep 2023 16:16:08 -0400", "from forwardcorp1c.mail.yandex.net ([178.154.239.200])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vsementsov@yandex-team.ru>)\n id 1qlETT-0002hU-Bx\n for qemu-devel@nongnu.org; Tue, 26 Sep 2023 16:16:08 -0400", "from mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net\n (mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net\n [IPv6:2a02:6b8:c12:550b:0:640:d49b:0])\n by forwardcorp1c.mail.yandex.net (Yandex) with ESMTP id 0951760B97;\n Tue, 26 Sep 2023 23:15:59 +0300 (MSK)", "from vsementsov-lin.. (unknown [2a02:6b8:b081:b41d::1:39])\n by mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net (smtpcorp/Yandex) with\n ESMTPSA id ZFWwvr0Oc0U0-7te6I8Sr; Tue, 26 Sep 2023 23:15:58 +0300" ], "Precedence": "bulk", "X-Yandex-Fwd": "1", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru;\n s=default; t=1695759358;\n bh=3bfRsX2bcaRNysuZopQT1GUhW00NrecV1SjNahVWt/I=;\n h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From;\n b=Uvq89eCVs2AlGuqW58Q5O5sBr+wyhPW8wK2SIlegWEQW5GH5Oqt4iythFeRZ4qrj6\n e3MPIh2GmUHYa5mxqhr77EHPgWNrq09dxznlyziC/heoNkflZETVke7w49h2LfdFgv\n paZr0BAs3BfEKhDYwYapHxJ97DZFaa4lmLk3SFLs=", "From": "Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>", "To": "qemu-devel@nongnu.org", "Cc": "pbonzini@redhat.com, vsementsov@yandex-team.ru, peter.maydell@linaro.org,\n yc-core@yandex-team.ru, davydov-max@yandex-team.ru,\n \"Michael S. Tsirkin\" <mst@redhat.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>", "Subject": "[PATCH v2 5/8] pcie_sriov: unregister_vfs(): fix error path", "Date": "Tue, 26 Sep 2023 23:15:29 +0300", "Message-Id": "<20230926201532.221152-6-vsementsov@yandex-team.ru>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20230926201532.221152-1-vsementsov@yandex-team.ru>", "References": "<20230926201532.221152-1-vsementsov@yandex-team.ru>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=178.154.239.200;\n envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1c.mail.yandex.net", "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, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n 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", "List-Id": "<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": "local_err must be NULL before calling object_property_set_bool(), so we\nmust clear it on each iteration. Let's also use more convenient\nerror_reportf_err().\n\nSigned-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>\n---\n hw/pci/pcie_sriov.c | 9 +++------\n 1 file changed, 3 insertions(+), 6 deletions(-)", "diff": "diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c\nindex 76a3b6917e..5ef8950940 100644\n--- a/hw/pci/pcie_sriov.c\n+++ b/hw/pci/pcie_sriov.c\n@@ -196,19 +196,16 @@ static void register_vfs(PCIDevice *dev)\n \n static void unregister_vfs(PCIDevice *dev)\n {\n- Error *local_err = NULL;\n uint16_t num_vfs = dev->exp.sriov_pf.num_vfs;\n uint16_t i;\n \n trace_sriov_unregister_vfs(dev->name, PCI_SLOT(dev->devfn),\n PCI_FUNC(dev->devfn), num_vfs);\n for (i = 0; i < num_vfs; i++) {\n+ Error *err = NULL;\n PCIDevice *vf = dev->exp.sriov_pf.vf[i];\n- object_property_set_bool(OBJECT(vf), \"realized\", false, &local_err);\n- if (local_err) {\n- fprintf(stderr, \"Failed to unplug: %s\\n\",\n- error_get_pretty(local_err));\n- error_free(local_err);\n+ if (!object_property_set_bool(OBJECT(vf), \"realized\", false, &err)) {\n+ error_reportf_err(err, \"Failed to unplug: \");\n }\n object_unparent(OBJECT(vf));\n object_unref(OBJECT(vf));\n", "prefixes": [ "v2", "5/8" ] }