[PATCH 1/5] hw/timer/hpet: Include missing 'hw/qdev-properties.h' header

Philippe Mathieu-Daudé posted 5 patches 2 years, 11 months ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Sergio Lopez <slp@redhat.com>, "Hervé Poussineau" <hpoussin@reactos.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Aurelien Jarno <aurelien@aurel32.net>, Huacai Chen <chenhuacai@kernel.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Marcelo Tosatti <mtosatti@redhat.com>
[PATCH 1/5] hw/timer/hpet: Include missing 'hw/qdev-properties.h' header
Posted by Philippe Mathieu-Daudé 2 years, 11 months ago
Avoid when refactoring unrelated headers:

  hw/timer/hpet.c:776:39: error: array has incomplete element type 'Property' (aka 'struct Property')
  static Property hpet_device_properties[] = {
                                        ^
  hw/timer/hpet.c:777:5: error: implicit declaration of function 'DEFINE_PROP_UINT8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
      ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/timer/hpet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index 9520471be2..214d6a0501 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -30,6 +30,7 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
+#include "hw/qdev-properties.h"
 #include "hw/timer/hpet.h"
 #include "hw/sysbus.h"
 #include "hw/rtc/mc146818rtc.h"
-- 
2.38.1


Re: [PATCH 1/5] hw/timer/hpet: Include missing 'hw/qdev-properties.h' header
Posted by Richard Henderson 2 years, 11 months ago
On 2/15/23 07:43, Philippe Mathieu-Daudé wrote:
> Avoid when refactoring unrelated headers:
> 
>    hw/timer/hpet.c:776:39: error: array has incomplete element type 'Property' (aka 'struct Property')
>    static Property hpet_device_properties[] = {
>                                          ^
>    hw/timer/hpet.c:777:5: error: implicit declaration of function 'DEFINE_PROP_UINT8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>        DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
>        ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/timer/hpet.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
> index 9520471be2..214d6a0501 100644
> --- a/hw/timer/hpet.c
> +++ b/hw/timer/hpet.c
> @@ -30,6 +30,7 @@
>   #include "qapi/error.h"
>   #include "qemu/error-report.h"
>   #include "qemu/timer.h"
> +#include "hw/qdev-properties.h"
>   #include "hw/timer/hpet.h"
>   #include "hw/sysbus.h"
>   #include "hw/rtc/mc146818rtc.h"

Acked-by: Richard Henderson <richard.henderson@linaro.org>

r~