{"id":814085,"url":"http://patchwork.ozlabs.org/api/patches/814085/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170915063552.33868-1-aik@ozlabs.ru/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","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":"<20170915063552.33868-1-aik@ozlabs.ru>","list_archive_url":null,"date":"2017-09-15T06:35:52","name":"[qemu,v2] pci: Initialize pci_dev->name before use","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"537a471e229baad8270f9b97a0d86d2e71b6c191","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/?format=json","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170915063552.33868-1-aik@ozlabs.ru/mbox/","series":[{"id":3230,"url":"http://patchwork.ozlabs.org/api/series/3230/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3230","date":"2017-09-15T06:35:52","name":"[qemu,v2] pci: Initialize pci_dev->name before use","version":2,"mbox":"http://patchwork.ozlabs.org/series/3230/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/814085/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/814085/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@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtm050fplz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 16:36:53 +1000 (AEST)","from localhost ([::1]:51564 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dskF9-0000eZ-7f\n\tfor incoming@patchwork.ozlabs.org; Fri, 15 Sep 2017 02:36:51 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:32783)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dskEq-0000eD-EB\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 02:36:33 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dskEm-0007n3-Bt\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 02:36:32 -0400","from ozlabs.ru ([107.173.13.209]:60448)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1dskEm-0007ma-5y\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 02:36:28 -0400","from vpl1.ozlabs.ibm.com (localhost [IPv6:::1])\n\tby ozlabs.ru (Postfix) with ESMTP id 644F63A6000A;\n\tFri, 15 Sep 2017 02:37:09 -0400 (EDT)"],"From":"Alexey Kardashevskiy <aik@ozlabs.ru>","To":"qemu-devel@nongnu.org","Date":"Fri, 15 Sep 2017 16:35:52 +1000","Message-Id":"<20170915063552.33868-1-aik@ozlabs.ru>","X-Mailer":"git-send-email 2.11.0","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [fuzzy]","X-Received-From":"107.173.13.209","Subject":"[Qemu-devel] [PATCH qemu v2] pci: Initialize pci_dev->name before\n\tuse","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://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\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Alexey Kardashevskiy <aik@ozlabs.ru>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"This moves pci_dev->name initialization earlier so\npci_dev->bus_master_as could get a name instead of an empty string.\n\nSigned-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>\nReviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n---\nChanges:\nv2:\n* fixed mistype in the commit log\n* added \"rb\"\n---\n hw/pci/pci.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/hw/pci/pci.c b/hw/pci/pci.c\nindex 21e203b056..353195d154 100644\n--- a/hw/pci/pci.c\n+++ b/hw/pci/pci.c\n@@ -1020,6 +1020,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,\n \n     pci_dev->devfn = devfn;\n     pci_dev->requester_id_cache = pci_req_id_cache_get(pci_dev);\n+    pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);\n \n     memory_region_init(&pci_dev->bus_master_container_region, OBJECT(pci_dev),\n                        \"bus master container\", UINT64_MAX);\n@@ -1029,7 +1030,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,\n     if (qdev_hotplug) {\n         pci_init_bus_master(pci_dev);\n     }\n-    pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);\n     pci_dev->irq_state = 0;\n     pci_config_alloc(pci_dev);\n \n","prefixes":["qemu","v2"]}