[Qemu-devel] [PATCH 06/11] hw/arm: removed unnecessary include

Philippe Mathieu-Daudé posted 11 patches 8 years, 9 months ago
Only 10 patches received!
[Qemu-devel] [PATCH 06/11] hw/arm: removed unnecessary include
Posted by Philippe Mathieu-Daudé 8 years, 9 months ago
"exec/memory.h" already includes it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/hw/arm/arm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h
index a3f79d3379..b9c11d3fb8 100644
--- a/include/hw/arm/arm.h
+++ b/include/hw/arm/arm.h
@@ -14,7 +14,6 @@
 #include "exec/memory.h"
 #include "target/arm/cpu-qom.h"
 #include "hw/irq.h"
-#include "qemu/notify.h"
 
 typedef enum {
     ARM_ENDIANNESS_UNKNOWN = 0,
-- 
2.11.0


Re: [Qemu-devel] [PATCH 06/11] hw/arm: removed unnecessary include
Posted by Michael Tokarev 8 years, 8 months ago
09.05.2017 02:39, Philippe Mathieu-Daudé wrote:
> "exec/memory.h" already includes it.

I think this sort of include cleanups isn't really necessary.
For a regular include file, it's better to include it if the
.c file in question uses definitions from there, no matter if
other .h files include that header already or not.

Thanks,

/mjt

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  include/hw/arm/arm.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h
> index a3f79d3379..b9c11d3fb8 100644
> --- a/include/hw/arm/arm.h
> +++ b/include/hw/arm/arm.h
> @@ -14,7 +14,6 @@
>  #include "exec/memory.h"
>  #include "target/arm/cpu-qom.h"
>  #include "hw/irq.h"
> -#include "qemu/notify.h"
>  
>  typedef enum {
>      ARM_ENDIANNESS_UNKNOWN = 0,
> 


Re: [Qemu-devel] [PATCH 06/11] hw/arm: removed unnecessary include
Posted by Philippe Mathieu-Daudé 8 years, 8 months ago
On 05/23/2017 11:58 AM, Michael Tokarev wrote:
> 09.05.2017 02:39, Philippe Mathieu-Daudé wrote:
>> "exec/memory.h" already includes it.
>
> I think this sort of include cleanups isn't really necessary.

Some are useful ;)

> For a regular include file, it's better to include it if the
> .c file in question uses definitions from there, no matter if
> other .h files include that header already or not.

Ok. This one was incorrect anyway :( thank for the review!

>
> Thanks,
>
> /mjt
>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>  include/hw/arm/arm.h | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h
>> index a3f79d3379..b9c11d3fb8 100644
>> --- a/include/hw/arm/arm.h
>> +++ b/include/hw/arm/arm.h
>> @@ -14,7 +14,6 @@
>>  #include "exec/memory.h"
>>  #include "target/arm/cpu-qom.h"
>>  #include "hw/irq.h"
>> -#include "qemu/notify.h"
>>
>>  typedef enum {
>>      ARM_ENDIANNESS_UNKNOWN = 0,
>>
>