[PATCH] hw/nmi: Fix the NMI() macro, based on INTERFACE_CHECK()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] hw/nmi: Fix the NMI() macro, based on INTERFACE_CHECK()

Philippe Mathieu-Daudé-3
There is no declaration of the 'NMI' type. INTERFACE_CHECK()
returns an abstract type (see commit aa1b35b975d8). The abstract
type corresponding to the TYPE_NMI interface is 'NMIState'.

Fixes: 9cb805fd267
Signed-off-by: Philippe Mathieu-Daudé <[hidden email]>
---
 include/hw/nmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/nmi.h b/include/hw/nmi.h
index a1e128724e..fe37ce3ad8 100644
--- a/include/hw/nmi.h
+++ b/include/hw/nmi.h
@@ -31,7 +31,7 @@
 #define NMI_GET_CLASS(obj) \
     OBJECT_GET_CLASS(NMIClass, (obj), TYPE_NMI)
 #define NMI(obj) \
-     INTERFACE_CHECK(NMI, (obj), TYPE_NMI)
+     INTERFACE_CHECK(NMIState, (obj), TYPE_NMI)
 
 typedef struct NMIState NMIState;
 
--
2.21.0


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] hw/nmi: Fix the NMI() macro, based on INTERFACE_CHECK()

Gavin Shan-2
On 12/7/19 8:48 PM, Philippe Mathieu-Daudé wrote:
> There is no declaration of the 'NMI' type. INTERFACE_CHECK()
> returns an abstract type (see commit aa1b35b975d8). The abstract
> type corresponding to the TYPE_NMI interface is 'NMIState'.
>
> Fixes: 9cb805fd267
> Signed-off-by: Philippe Mathieu-Daudé <[hidden email]>
> ---

Reviewed-by: Gavin Shan <[hidden email]>

>   include/hw/nmi.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/hw/nmi.h b/include/hw/nmi.h
> index a1e128724e..fe37ce3ad8 100644
> --- a/include/hw/nmi.h
> +++ b/include/hw/nmi.h
> @@ -31,7 +31,7 @@
>   #define NMI_GET_CLASS(obj) \
>       OBJECT_GET_CLASS(NMIClass, (obj), TYPE_NMI)
>   #define NMI(obj) \
> -     INTERFACE_CHECK(NMI, (obj), TYPE_NMI)
> +     INTERFACE_CHECK(NMIState, (obj), TYPE_NMI)
>  
>   typedef struct NMIState NMIState;
>  
>


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] hw/nmi: Fix the NMI() macro, based on INTERFACE_CHECK()

Eduardo Habkost-2
On Sun, Dec 08, 2019 at 12:44:16AM +1100, Gavin Shan wrote:

> On 12/7/19 8:48 PM, Philippe Mathieu-Daudé wrote:
> > There is no declaration of the 'NMI' type. INTERFACE_CHECK()
> > returns an abstract type (see commit aa1b35b975d8). The abstract
> > type corresponding to the TYPE_NMI interface is 'NMIState'.
> >
> > Fixes: 9cb805fd267
> > Signed-off-by: Philippe Mathieu-Daudé <[hidden email]>
> > ---
>
> Reviewed-by: Gavin Shan <[hidden email]>

Queued, thanks!

--
Eduardo