{"id":817635,"url":"http://patchwork.ozlabs.org/api/patches/817635/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170922160111.31885-10-f4bug@amsat.org/","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":"<20170922160111.31885-10-f4bug@amsat.org>","list_archive_url":null,"date":"2017-09-22T16:01:09","name":"[32/34] hw/net/ne2000: use TYPE_PCI_NE2000","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ae9224f1a4aebc2521e9bcc75b71d71a63557ca1","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/?format=json","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170922160111.31885-10-f4bug@amsat.org/mbox/","series":[{"id":4657,"url":"http://patchwork.ozlabs.org/api/series/4657/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=4657","date":"2017-09-22T15:39:40","name":"remove i386/pc dependency from non-PC world (part 1)","version":1,"mbox":"http://patchwork.ozlabs.org/series/4657/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/817635/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/817635/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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"C+1+cmR2\"; dkim-atps=neutral"],"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 3xzJkK5Wr7z9t3h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 02:25:45 +1000 (AEST)","from localhost ([::1]:59974 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 1dvQlr-0001iR-Mj\n\tfor incoming@patchwork.ozlabs.org; Fri, 22 Sep 2017 12:25:43 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:52231)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dvQPE-0006dS-9K\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 12:02:23 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dvQP8-0000Id-3v\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 12:02:20 -0400","from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:35705)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dvQP7-0000IK-TR; Fri, 22 Sep 2017 12:02:13 -0400","by mail-qt0-x241.google.com with SMTP id l25so922639qtf.2;\n\tFri, 22 Sep 2017 09:02:13 -0700 (PDT)","from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id\n\ty31sm108325qta.83.2017.09.22.09.02.08\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 22 Sep 2017 09:02:12 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=9wBr7MaEAlSzNBhHHaN4TtcRiiDMdOEVFwJ5WRoCOoo=;\n\tb=C+1+cmR22e+jIRtd54TyOVMDMt8IjQZ5AJfhilq9lhMN+yKEtcaiFh7eMTML0HtGH9\n\tPinI2S0wkjmTZSfD8RJA2hsFKjah8m6J/WizVjfFYi/bohS/fvX1L3LqcyCcgEpswl6J\n\tqey5GGMI7H1vEJdM9PmuqXGTEybE4nQwTBrj+K+KmA5JGOtpYz6nem6ZNQI6schHtGJw\n\tr7FrHTzRmlkXwiIgCxMLsqbPGsvUD0F9MLJ2VfRpyILUar6Ef4dnhWFAihO8DCOaTZp8\n\tGzQ4G2sbzJqr27fS/2NFfFOBhaf/Jj/Wy1rcNCmuvs8OC3D2Ir5e2k2L3JgRzR24AvgY\n\tzH/Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=9wBr7MaEAlSzNBhHHaN4TtcRiiDMdOEVFwJ5WRoCOoo=;\n\tb=F/V0wa+2Ezcxn67nL0Y6DdnKLnURXkLZJTHkI9dzgyctu9uAvdoZZbVcqlvC/Ld7rl\n\tOXThrCSNDtXbKWLfWpTMBM/OG7pKWsvN/A/5TEA2I4lbBpWt71keLrc/CJG0ULYrGaL2\n\tAPVTymOce7ni65bSEBcZ834CWgYrw+/fl/FLxp5bGYWLXdnVU5nSFP86FtAvZtLppD/M\n\tJ66v0m3cyoGqo6Oozi0wndVPHFq0PT471ojHE2kdM40YbnzinHVOpTl3lNFsx9gO9GWV\n\tNglsz7HEjzT9kjoqPRvw15pJl/oDffEIKRNQSuv8w4bIYbowm+mvdcpZbuaGReubsJ+g\n\t1FpA==","X-Gm-Message-State":"AHPjjUiF/4NPtReSxL5H5K6YZIE722Gi/qLycAgcM+Ef6sODH8+Y796s\n\tOBziHN5nBXbujUrZtoIQUpM=","X-Google-Smtp-Source":"AOwi7QD+j1uSEZwCFvrre5ivOEuH9TVKdiE1AwpTWMTxMN+hwEFvHqZh01vdHO2qzB9ppFWRVodssA==","X-Received":"by 10.200.47.24 with SMTP id j24mr9127300qta.147.1506096133239; \n\tFri, 22 Sep 2017 09:02:13 -0700 (PDT)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","To":"Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>, Marcel Apfelbaum\n\t<marcel@redhat.com>, =?utf-8?q?Herv=C3=A9_Poussineau?=\n\t<hpoussin@reactos.org>, Aurelien Jarno <aurelien@aurel32.net>,\n\tAlexander Graf <agraf@suse.de>, David Gibson\n\t<david@gibson.dropbear.id.au>, \tJason Wang <jasowang@redhat.com>,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, \n\tArtyom Tarasenko <atar4qemu@gmail.com>","Date":"Fri, 22 Sep 2017 13:01:09 -0300","Message-Id":"<20170922160111.31885-10-f4bug@amsat.org>","X-Mailer":"git-send-email 2.14.1","In-Reply-To":"<20170922154014.29350-1-f4bug@amsat.org>","References":"<20170922154014.29350-1-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c0d::241","Subject":"[Qemu-devel] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000","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":"qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathi?=\n\t=?utf-8?b?ZXUtRGF1ZMOp?= <f4bug@amsat.org>, \tqemu-devel@nongnu.org","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":"Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n---\n include/hw/net/pci.h  | 1 +\n hw/net/ne2000.c       | 3 ++-\n hw/ppc/mac_newworld.c | 3 ++-\n hw/ppc/mac_oldworld.c | 3 ++-\n hw/ppc/prep.c         | 2 +-\n hw/sparc64/sun4u.c    | 3 ++-\n 6 files changed, 10 insertions(+), 5 deletions(-)","diff":"diff --git a/include/hw/net/pci.h b/include/hw/net/pci.h\nindex 43ed3b0145..da733dd1d9 100644\n--- a/include/hw/net/pci.h\n+++ b/include/hw/net/pci.h\n@@ -15,6 +15,7 @@\n \n #define TYPE_PCI_E1000      \"e1000\"\n #define TYPE_PCI_E1000E     \"e1000e\"\n+#define TYPE_PCI_NE2000     \"ne2k_pci\"\n #define TYPE_PCI_PCNET      \"pcnet\"\n #define TYPE_PCI_RTL8139    \"rtl8139\"\n \ndiff --git a/hw/net/ne2000.c b/hw/net/ne2000.c\nindex 29bd4adb3f..b0a664d302 100644\n--- a/hw/net/ne2000.c\n+++ b/hw/net/ne2000.c\n@@ -23,6 +23,7 @@\n  */\n #include \"qemu/osdep.h\"\n #include \"hw/pci/pci.h\"\n+#include \"hw/net/pci.h\"\n #include \"ne2000.h\"\n #include \"hw/loader.h\"\n #include \"sysemu/sysemu.h\"\n@@ -779,7 +780,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)\n }\n \n static const TypeInfo ne2000_info = {\n-    .name          = \"ne2k_pci\",\n+    .name          = TYPE_PCI_NE2000,\n     .parent        = TYPE_PCI_DEVICE,\n     .instance_size = sizeof(PCINE2000State),\n     .class_init    = ne2000_class_init,\ndiff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c\nindex 33b46cb50b..2afc35c27f 100644\n--- a/hw/ppc/mac_newworld.c\n+++ b/hw/ppc/mac_newworld.c\n@@ -55,6 +55,7 @@\n #include \"hw/ppc/mac_dbdma.h\"\n #include \"hw/timer/m48t59.h\"\n #include \"hw/pci/pci.h\"\n+#include \"hw/net/pci.h\"\n #include \"net/net.h\"\n #include \"sysemu/sysemu.h\"\n #include \"hw/boards.h\"\n@@ -435,7 +436,7 @@ static void ppc_core99_init(MachineState *machine)\n     }\n \n     for (i = 0; i < nb_nics; i++) {\n-        pci_nic_init_nofail(&nd_table[i], pci_bus, \"ne2k_pci\", NULL);\n+        pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);\n     }\n \n     /* The NewWorld NVRAM is not located in the MacIO device */\ndiff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c\nindex 193b9047d9..8096e5a126 100644\n--- a/hw/ppc/mac_oldworld.c\n+++ b/hw/ppc/mac_oldworld.c\n@@ -34,6 +34,7 @@\n #include \"net/net.h\"\n #include \"hw/isa/isa.h\"\n #include \"hw/pci/pci.h\"\n+#include \"hw/net/pci.h\"\n #include \"hw/boards.h\"\n #include \"hw/nvram/fw_cfg.h\"\n #include \"hw/char/escc.h\"\n@@ -278,7 +279,7 @@ static void ppc_heathrow_init(MachineState *machine)\n                              escc_mem, 0, memory_region_size(escc_mem));\n \n     for(i = 0; i < nb_nics; i++)\n-        pci_nic_init_nofail(&nd_table[i], pci_bus, \"ne2k_pci\", NULL);\n+        pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);\n \n \n     ide_drive_get(hd, ARRAY_SIZE(hd));\ndiff --git a/hw/ppc/prep.c b/hw/ppc/prep.c\nindex b2c7a62ebc..103beafef3 100644\n--- a/hw/ppc/prep.c\n+++ b/hw/ppc/prep.c\n@@ -636,7 +636,7 @@ static void ppc_prep_init(MachineState *machine)\n             isa_ne2000_init(isa_bus, ne2000_io[i], ne2000_irq[i],\n                             &nd_table[i]);\n         } else {\n-            pci_nic_init_nofail(&nd_table[i], pci_bus, \"ne2k_pci\", NULL);\n+            pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);\n         }\n     }\n \ndiff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c\nindex fd10741607..67879c5135 100644\n--- a/hw/sparc64/sun4u.c\n+++ b/hw/sparc64/sun4u.c\n@@ -32,6 +32,7 @@\n #include \"hw/char/serial.h\"\n #include \"hw/timer/m48t59.h\"\n #include \"hw/input/i8042.h\"\n+#include \"hw/net/pci.h\"\n #include \"hw/block/fdc.h\"\n #include \"net/net.h\"\n #include \"qemu/timer.h\"\n@@ -476,7 +477,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,\n \n             onboard_nic_idx = i;\n         } else {\n-            pci_nic_init_nofail(nd, pci_bus, \"ne2k_pci\", NULL);\n+            pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_NE2000, NULL);\n         }\n     }\n     onboard_nic_idx = MAX(onboard_nic_idx, 0);\n","prefixes":["32/34"]}