Re: [Qemu-devel] [PATCH 15/16] hw/devices: Move SMSC 91C111 declaration into a new header

2019-01-06 Thread Thomas Huth
On 2019-01-04 18:58, Philippe Mathieu-Daudé wrote:
> This commit finally deletes "hw/devices.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé 
> ---
>  hw/arm/gumstix.c   |  2 +-
>  hw/arm/integratorcp.c  |  2 +-
>  hw/arm/mainstone.c |  2 +-
>  hw/arm/realview.c  |  2 +-
>  hw/arm/versatilepb.c   |  2 +-
>  hw/net/smc91c111.c |  2 +-
>  include/hw/devices.h   | 11 ---
>  include/hw/net/smc91c111.h | 18 ++
>  8 files changed, 24 insertions(+), 17 deletions(-)
>  delete mode 100644 include/hw/devices.h
>  create mode 100644 include/hw/net/smc91c111.h
[...]
> diff --git a/include/hw/net/smc91c111.h b/include/hw/net/smc91c111.h
> new file mode 100644
> index 00..46f7d9a5d4
> --- /dev/null
> +++ b/include/hw/net/smc91c111.h
> @@ -0,0 +1,18 @@
> +/*
> + * SMSC 91C111 Ethernet interface emulation
> + *
> + * Copyright (c) 2005 CodeSourcery, LLC.
> + * Written by Paul Brook
> + *
> + * This code is licensed under the GPL

I'd like to suggest to use here GPLv2+, too, since just "GPL" is quite
inaccurate.

> + */
> +
> +#ifndef HW_NET_SMC91C111_H
> +#define HW_NET_SMC91C111_H
> +
> +#include "hw/irq.h"
> +#include "net/net.h"
> +
> +void smc91c111_init(NICInfo *, uint32_t, qemu_irq);
> +
> +#endif
> 

 Thomas



[Qemu-devel] [PATCH 15/16] hw/devices: Move SMSC 91C111 declaration into a new header

2019-01-04 Thread Philippe Mathieu-Daudé
This commit finally deletes "hw/devices.h".

Signed-off-by: Philippe Mathieu-Daudé 
---
 hw/arm/gumstix.c   |  2 +-
 hw/arm/integratorcp.c  |  2 +-
 hw/arm/mainstone.c |  2 +-
 hw/arm/realview.c  |  2 +-
 hw/arm/versatilepb.c   |  2 +-
 hw/net/smc91c111.c |  2 +-
 include/hw/devices.h   | 11 ---
 include/hw/net/smc91c111.h | 18 ++
 8 files changed, 24 insertions(+), 17 deletions(-)
 delete mode 100644 include/hw/devices.h
 create mode 100644 include/hw/net/smc91c111.h

diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c
index 56cb763c4e..98c3e6d41c 100644
--- a/hw/arm/gumstix.c
+++ b/hw/arm/gumstix.c
@@ -40,7 +40,7 @@
 #include "hw/arm/pxa.h"
 #include "net/net.h"
 #include "hw/block/flash.h"
-#include "hw/devices.h"
+#include "hw/net/smc91c111.h"
 #include "hw/boards.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index 4eceebb9ea..0b6f24465e 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -12,10 +12,10 @@
 #include "qemu-common.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/arm/arm.h"
 #include "hw/misc/arm_integrator_debug.h"
+#include "hw/net/smc91c111.h"
 #include "net/net.h"
 #include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 0beb5c426b..fbe8d5cbd4 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -18,7 +18,7 @@
 #include "hw/arm/pxa.h"
 #include "hw/arm/arm.h"
 #include "net/net.h"
-#include "hw/devices.h"
+#include "hw/net/smc91c111.h"
 #include "hw/boards.h"
 #include "hw/block/flash.h"
 #include "hw/sysbus.h"
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index e9983c8763..05a244df25 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -14,8 +14,8 @@
 #include "hw/sysbus.h"
 #include "hw/arm/arm.h"
 #include "hw/arm/primecell.h"
-#include "hw/devices.h"
 #include "hw/net/lan9118.h"
+#include "hw/net/smc91c111.h"
 #include "hw/pci/pci.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 22b09a1e61..70b5fda737 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -13,7 +13,7 @@
 #include "cpu.h"
 #include "hw/sysbus.h"
 #include "hw/arm/arm.h"
-#include "hw/devices.h"
+#include "hw/net/smc91c111.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
 #include "hw/pci/pci.h"
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index 99da2d9297..d19ea0750d 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "net/net.h"
-#include "hw/devices.h"
+#include "hw/net/smc91c111.h"
 #include "qemu/log.h"
 /* For crc32 */
 #include 
diff --git a/include/hw/devices.h b/include/hw/devices.h
deleted file mode 100644
index ebc45c8799..00
--- a/include/hw/devices.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef QEMU_DEVICES_H
-#define QEMU_DEVICES_H
-
-/* Devices that have nowhere better to go.  */
-
-#include "hw/hw.h"
-
-/* smc91c111.c */
-void smc91c111_init(NICInfo *, uint32_t, qemu_irq);
-
-#endif
diff --git a/include/hw/net/smc91c111.h b/include/hw/net/smc91c111.h
new file mode 100644
index 00..46f7d9a5d4
--- /dev/null
+++ b/include/hw/net/smc91c111.h
@@ -0,0 +1,18 @@
+/*
+ * SMSC 91C111 Ethernet interface emulation
+ *
+ * Copyright (c) 2005 CodeSourcery, LLC.
+ * Written by Paul Brook
+ *
+ * This code is licensed under the GPL
+ */
+
+#ifndef HW_NET_SMC91C111_H
+#define HW_NET_SMC91C111_H
+
+#include "hw/irq.h"
+#include "net/net.h"
+
+void smc91c111_init(NICInfo *, uint32_t, qemu_irq);
+
+#endif
-- 
2.17.2