On Tue, Jun 11, 2013 at 4:40 PM, <peter.crosthwa...@xilinx.com> wrote: > From: Peter Crosthwaite <peter.crosthwa...@xilinx.com> > > Define and use standard QOM cast macro. Remove usages of DO_UPCAST > and direct -> style upcasting. > > Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> > --- > > hw/net/e1000.c | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) > > diff --git a/hw/net/e1000.c b/hw/net/e1000.c > index e6f46f0..a7de400 100644 > --- a/hw/net/e1000.c > +++ b/hw/net/e1000.c > @@ -138,6 +138,11 @@ typedef struct E1000State_st { > uint32_t compat_flags; > } E1000State; > > +#define TYPE_E1000 "e1000" > + > +#define E1000(obj) \ > + OBJECT_CHECK(E1000State, (obj), TYPE_E1000) > + > #define defreg(x) x = (E1000_##x>>2) > enum { > defreg(CTRL), defreg(EECD), defreg(EERD), defreg(GPRC), > @@ -1175,7 +1180,7 @@ static int e1000_post_load(void *opaque, int version_id) > } > > static const VMStateDescription vmstate_e1000 = { > - .name = "e1000", > + .name = TYPE_E1000,
Will fix v2 as per discussion recent discussion on type string usages. Regards, Peter