[Qemu-devel] [PATCH 1/2] hw/display/sm501: Remove unused include

Philippe Mathieu-Daudé posted 2 patches 6 years, 6 months ago
[Qemu-devel] [PATCH 1/2] hw/display/sm501: Remove unused include
Posted by Philippe Mathieu-Daudé 6 years, 6 months ago
The "cpu.h" include makes devices target-specific. Since it
is not used, remove it, so the device become generic (we can
now compile it once for all targets).

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/display/sm501.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 5918f59b2b..b15fb1ab00 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -28,7 +28,6 @@
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/hw.h"
 #include "hw/char/serial.h"
 #include "ui/console.h"
-- 
2.20.1


Re: [Qemu-devel] [PATCH 1/2] hw/display/sm501: Remove unused include
Posted by Thomas Huth 6 years, 6 months ago
On 8/12/19 1:37 PM, Philippe Mathieu-Daudé wrote:
> The "cpu.h" include makes devices target-specific. Since it
> is not used, remove it, so the device become generic (we can
> now compile it once for all targets).
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/display/sm501.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/display/sm501.c b/hw/display/sm501.c
> index 5918f59b2b..b15fb1ab00 100644
> --- a/hw/display/sm501.c
> +++ b/hw/display/sm501.c
> @@ -28,7 +28,6 @@
>  #include "qapi/error.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/hw.h"
>  #include "hw/char/serial.h"
>  #include "ui/console.h"
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [Qemu-devel] [PATCH 1/2] hw/display/sm501: Remove unused include
Posted by Laurent Vivier 6 years, 5 months ago
Le 12/08/2019 à 13:37, Philippe Mathieu-Daudé a écrit :
> The "cpu.h" include makes devices target-specific. Since it
> is not used, remove it, so the device become generic (we can
> now compile it once for all targets).
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/display/sm501.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/display/sm501.c b/hw/display/sm501.c
> index 5918f59b2b..b15fb1ab00 100644
> --- a/hw/display/sm501.c
> +++ b/hw/display/sm501.c
> @@ -28,7 +28,6 @@
>  #include "qapi/error.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/hw.h"
>  #include "hw/char/serial.h"
>  #include "ui/console.h"
> 

Applied to my trivial-patches branch.
[fixed a conflict with  with 650d103d3ea9 ("Include hw/hw.h exactly
where needed")]

Thanks,
Laurent