[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH 29/34] hw/net/e1000e: use TYPE_PCI_E1000E
From: |
Thomas Huth |
Subject: |
Re: [Qemu-trivial] [PATCH 29/34] hw/net/e1000e: use TYPE_PCI_E1000E |
Date: |
Mon, 25 Sep 2017 07:34:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 22.09.2017 18:01, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> include/hw/net/pci.h | 1 +
> hw/net/e1000e.c | 6 +++---
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/include/hw/net/pci.h b/include/hw/net/pci.h
> index b24b5257a5..92111f86f3 100644
> --- a/include/hw/net/pci.h
> +++ b/include/hw/net/pci.h
> @@ -14,6 +14,7 @@
> #include "hw/pci/pci_bus.h"
>
> #define TYPE_PCI_E1000 "e1000"
> +#define TYPE_PCI_E1000E "e1000e"
>
> PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,
> const char *default_model,
> diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
> index 6c42b4478c..494f8cced6 100644
> --- a/hw/net/e1000e.c
> +++ b/hw/net/e1000e.c
> @@ -40,6 +40,7 @@
> #include "sysemu/sysemu.h"
> #include "hw/pci/msi.h"
> #include "hw/pci/msix.h"
> +#include "hw/net/pci.h"
>
> #include "hw/net/e1000_regs.h"
>
> @@ -49,8 +50,7 @@
> #include "trace.h"
> #include "qapi/error.h"
>
> -#define TYPE_E1000E "e1000e"
> -#define E1000E(obj) OBJECT_CHECK(E1000EState, (obj), TYPE_E1000E)
> +#define E1000E(obj) OBJECT_CHECK(E1000EState, (obj), TYPE_PCI_E1000E)
>
> typedef struct E1000EState {
> PCIDevice parent_obj;
> @@ -703,7 +703,7 @@ static void e1000e_instance_init(Object *obj)
> }
>
> static const TypeInfo e1000e_info = {
> - .name = TYPE_E1000E,
> + .name = TYPE_PCI_E1000E,
> .parent = TYPE_PCI_DEVICE,
> .instance_size = sizeof(E1000EState),
> .class_init = e1000e_class_init,
>
That seems unnecessary to me, since it's not used anywhere outside of
e1000e.c. I'd suggest to drop this patch.
Thomas
- [Qemu-trivial] [PATCH 25/34] hw/timer/m48t59: use TYPE_M48T59_ISA, add entries to MAINTAINERS, (continued)
- [Qemu-trivial] [PATCH 25/34] hw/timer/m48t59: use TYPE_M48T59_ISA, add entries to MAINTAINERS, Philippe Mathieu-Daudé, 2017/09/22
- [Qemu-trivial] [PATCH 24/34] hw/timer/mc146818: rename rtc_init() -> mc146818_init(), Philippe Mathieu-Daudé, 2017/09/22
- [Qemu-trivial] [PATCH 26/34] hw/net/ne2000: extract ne2k-isa code from i386/pc to ne2000-isa.c, Philippe Mathieu-Daudé, 2017/09/22
- [Qemu-trivial] [PATCH 29/34] hw/net/e1000e: use TYPE_PCI_E1000E, Philippe Mathieu-Daudé, 2017/09/22
- Re: [Qemu-trivial] [PATCH 29/34] hw/net/e1000e: use TYPE_PCI_E1000E,
Thomas Huth <=
- [Qemu-trivial] [PATCH 28/34] hw/net/e1000: use TYPE_PCI_E1000, Philippe Mathieu-Daudé, 2017/09/22
- [Qemu-trivial] [PATCH 27/34] hw/pci: declare pci_nic_init_nofail() in "hw/net/pci.h", Philippe Mathieu-Daudé, 2017/09/22
- [Qemu-trivial] [PATCH 31/34] hw/net/rtl8139: use TYPE_PCI_RTL8139, Philippe Mathieu-Daudé, 2017/09/22
- [Qemu-trivial] [PATCH 33/34] hw/alpha: remove old i386 dependency, Philippe Mathieu-Daudé, 2017/09/22
- [Qemu-trivial] [PATCH 30/34] hw/net/pcnet: use TYPE_PCI_PCNET, Philippe Mathieu-Daudé, 2017/09/22