[PATCH v2 14/14] hw/rtc/aspeed_rtc: Remove unused includes

Philippe Mathieu-Daudé posted 14 patches 6 years, 4 months ago
Maintainers: Aleksandar Markovic <amarkovic@wavecomp.com>, Aurelien Jarno <aurelien@aurel32.net>, Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>, Thomas Huth <thuth@redhat.com>, "Cédric Le Goater" <clg@kaod.org>, "Hervé Poussineau" <hpoussin@reactos.org>, David Gibson <david@gibson.dropbear.id.au>, Laurent Vivier <lvivier@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Peter Maydell <peter.maydell@linaro.org>, Igor Mammedov <imammedo@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Aleksandar Rikalo <arikalo@wavecomp.com>, Alistair Francis <alistair@alistair23.me>, Helge Deller <deller@gmx.de>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
[PATCH v2 14/14] hw/rtc/aspeed_rtc: Remove unused includes
Posted by Philippe Mathieu-Daudé 6 years, 4 months ago
The system <stdint.h> include is already provided by "osdep.h"
(the scripts/clean-includes file clean such headers).

Commit 64552b6be47 suggests we don't need to include "hw/irq.h":

    Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to
    qemu/typedefs.h, and then include hw/irq.h only where it's still
    needed.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 include/hw/rtc/aspeed_rtc.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/hw/rtc/aspeed_rtc.h b/include/hw/rtc/aspeed_rtc.h
index 3fde854ad9..b94a710268 100644
--- a/include/hw/rtc/aspeed_rtc.h
+++ b/include/hw/rtc/aspeed_rtc.h
@@ -8,9 +8,6 @@
 #ifndef HW_RTC_ASPEED_RTC_H
 #define HW_RTC_ASPEED_RTC_H
 
-#include <stdint.h>
-
-#include "hw/irq.h"
 #include "hw/sysbus.h"
 
 typedef struct AspeedRtcState {
-- 
2.20.1


Re: [PATCH v2 14/14] hw/rtc/aspeed_rtc: Remove unused includes
Posted by Laurent Vivier 6 years, 3 months ago
Le 04/10/2019 à 01:04, Philippe Mathieu-Daudé a écrit :
> The system <stdint.h> include is already provided by "osdep.h"
> (the scripts/clean-includes file clean such headers).
> 
> Commit 64552b6be47 suggests we don't need to include "hw/irq.h":
> 
>     Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to
>     qemu/typedefs.h, and then include hw/irq.h only where it's still
>     needed.
> 
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  include/hw/rtc/aspeed_rtc.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/include/hw/rtc/aspeed_rtc.h b/include/hw/rtc/aspeed_rtc.h
> index 3fde854ad9..b94a710268 100644
> --- a/include/hw/rtc/aspeed_rtc.h
> +++ b/include/hw/rtc/aspeed_rtc.h
> @@ -8,9 +8,6 @@
>  #ifndef HW_RTC_ASPEED_RTC_H
>  #define HW_RTC_ASPEED_RTC_H
>  
> -#include <stdint.h>
> -
> -#include "hw/irq.h"
>  #include "hw/sysbus.h"
>  
>  typedef struct AspeedRtcState {
> 

Applied to my trivial-patches branch.

Thanks,
Laurent