[PATCH 2/7] hw/hyperv/hyperv.h: header cleanup

Pierrick Bouvier posted 7 patches 3 weeks, 6 days ago
There is a newer version of this series
[PATCH 2/7] hw/hyperv/hyperv.h: header cleanup
Posted by Pierrick Bouvier 3 weeks, 6 days ago
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 include/hw/hyperv/hyperv.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h
index d717b4e13d4..c6f7039447f 100644
--- a/include/hw/hyperv/hyperv.h
+++ b/include/hw/hyperv/hyperv.h
@@ -10,7 +10,9 @@
 #ifndef HW_HYPERV_HYPERV_H
 #define HW_HYPERV_HYPERV_H
 
-#include "cpu-qom.h"
+#include "qemu/osdep.h"
+#include "exec/hwaddr.h"
+#include "hw/core/cpu.h"
 #include "hw/hyperv/hyperv-proto.h"
 
 typedef struct HvSintRoute HvSintRoute;
-- 
2.39.5
Re: [PATCH 2/7] hw/hyperv/hyperv.h: header cleanup
Posted by Alex Bennée 3 weeks, 6 days ago
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>  include/hw/hyperv/hyperv.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h
> index d717b4e13d4..c6f7039447f 100644
> --- a/include/hw/hyperv/hyperv.h
> +++ b/include/hw/hyperv/hyperv.h
> @@ -10,7 +10,9 @@
>  #ifndef HW_HYPERV_HYPERV_H
>  #define HW_HYPERV_HYPERV_H
>  
> -#include "cpu-qom.h"
> +#include "qemu/osdep.h"

We shouldn't need to include osdep.h in headers, indeed style says:

  Do not include "qemu/osdep.h" from header files since the .c file will have
  already included it.

> +#include "exec/hwaddr.h"
> +#include "hw/core/cpu.h"
>  #include "hw/hyperv/hyperv-proto.h"
>  
>  typedef struct HvSintRoute HvSintRoute;

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH 2/7] hw/hyperv/hyperv.h: header cleanup
Posted by Pierrick Bouvier 3 weeks, 5 days ago
On 3/6/25 04:27, Alex Bennée wrote:
> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> 
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> ---
>>   include/hw/hyperv/hyperv.h | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h
>> index d717b4e13d4..c6f7039447f 100644
>> --- a/include/hw/hyperv/hyperv.h
>> +++ b/include/hw/hyperv/hyperv.h
>> @@ -10,7 +10,9 @@
>>   #ifndef HW_HYPERV_HYPERV_H
>>   #define HW_HYPERV_HYPERV_H
>>   
>> -#include "cpu-qom.h"
>> +#include "qemu/osdep.h"
> 
> We shouldn't need to include osdep.h in headers, indeed style says:
> 
>    Do not include "qemu/osdep.h" from header files since the .c file will have
>    already included it.
>

Sure, I'll remove it.

>> +#include "exec/hwaddr.h"
>> +#include "hw/core/cpu.h"
>>   #include "hw/hyperv/hyperv-proto.h"
>>   
>>   typedef struct HvSintRoute HvSintRoute;
>