Message ID | 20170909142116.26816-1-n54@gmx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/09/2017 16:21, Kamil Rytarowski wrote: > SunOS defines ESP (x86 register) in <sys/regset.h> as 7. > > This fixes build on SmartOS (Joyent). > > Signed-off-by: Kamil Rytarowski <n54@gmx.com> > --- > hw/scsi/esp.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c > index eee831efeb..22c2d91e39 100644 > --- a/hw/scsi/esp.c > +++ b/hw/scsi/esp.c > @@ -593,7 +593,7 @@ const VMStateDescription vmstate_esp = { > }; > > #define TYPE_ESP "esp" > -#define ESP(obj) OBJECT_CHECK(SysBusESPState, (obj), TYPE_ESP) > +#define ESP_STATE(obj) OBJECT_CHECK(SysBusESPState, (obj), TYPE_ESP) > > typedef struct { > /*< private >*/ > @@ -644,7 +644,7 @@ void esp_init(hwaddr espaddr, int it_shift, > ESPState *esp; > > dev = qdev_create(NULL, TYPE_ESP); > - sysbus = ESP(dev); > + sysbus = ESP_STATE(dev); > esp = &sysbus->esp; > esp->dma_memory_read = dma_memory_read; > esp->dma_memory_write = dma_memory_write; > @@ -672,7 +672,7 @@ static const struct SCSIBusInfo esp_scsi_info = { > > static void sysbus_esp_gpio_demux(void *opaque, int irq, int level) > { > - SysBusESPState *sysbus = ESP(opaque); > + SysBusESPState *sysbus = ESP_STATE(opaque); > ESPState *s = &sysbus->esp; > > switch (irq) { > @@ -688,7 +688,7 @@ static void sysbus_esp_gpio_demux(void *opaque, int irq, int level) > static void sysbus_esp_realize(DeviceState *dev, Error **errp) > { > SysBusDevice *sbd = SYS_BUS_DEVICE(dev); > - SysBusESPState *sysbus = ESP(dev); > + SysBusESPState *sysbus = ESP_STATE(dev); > ESPState *s = &sysbus->esp; > > sysbus_init_irq(sbd, &s->irq); > @@ -706,7 +706,7 @@ static void sysbus_esp_realize(DeviceState *dev, Error **errp) > > static void sysbus_esp_hard_reset(DeviceState *dev) > { > - SysBusESPState *sysbus = ESP(dev); > + SysBusESPState *sysbus = ESP_STATE(dev); > esp_hard_reset(&sysbus->esp); > } > > Queued, thanks. Paolo
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index eee831efeb..22c2d91e39 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -593,7 +593,7 @@ const VMStateDescription vmstate_esp = { }; #define TYPE_ESP "esp" -#define ESP(obj) OBJECT_CHECK(SysBusESPState, (obj), TYPE_ESP) +#define ESP_STATE(obj) OBJECT_CHECK(SysBusESPState, (obj), TYPE_ESP) typedef struct { /*< private >*/ @@ -644,7 +644,7 @@ void esp_init(hwaddr espaddr, int it_shift, ESPState *esp; dev = qdev_create(NULL, TYPE_ESP); - sysbus = ESP(dev); + sysbus = ESP_STATE(dev); esp = &sysbus->esp; esp->dma_memory_read = dma_memory_read; esp->dma_memory_write = dma_memory_write; @@ -672,7 +672,7 @@ static const struct SCSIBusInfo esp_scsi_info = { static void sysbus_esp_gpio_demux(void *opaque, int irq, int level) { - SysBusESPState *sysbus = ESP(opaque); + SysBusESPState *sysbus = ESP_STATE(opaque); ESPState *s = &sysbus->esp; switch (irq) { @@ -688,7 +688,7 @@ static void sysbus_esp_gpio_demux(void *opaque, int irq, int level) static void sysbus_esp_realize(DeviceState *dev, Error **errp) { SysBusDevice *sbd = SYS_BUS_DEVICE(dev); - SysBusESPState *sysbus = ESP(dev); + SysBusESPState *sysbus = ESP_STATE(dev); ESPState *s = &sysbus->esp; sysbus_init_irq(sbd, &s->irq); @@ -706,7 +706,7 @@ static void sysbus_esp_realize(DeviceState *dev, Error **errp) static void sysbus_esp_hard_reset(DeviceState *dev) { - SysBusESPState *sysbus = ESP(dev); + SysBusESPState *sysbus = ESP_STATE(dev); esp_hard_reset(&sysbus->esp); }
SunOS defines ESP (x86 register) in <sys/regset.h> as 7. This fixes build on SmartOS (Joyent). Signed-off-by: Kamil Rytarowski <n54@gmx.com> --- hw/scsi/esp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)