aboutsummaryrefslogtreecommitdiff
path: root/hw/net/rocker
diff options
context:
space:
mode:
authorMao Zhongyi <maozy.fnst@cn.fujitsu.com>2017-08-14 11:33:10 +0800
committerJason Wang <jasowang@redhat.com>2017-09-08 08:17:37 +0800
commitac7bc031408491cf17da0a46e3fe34e34a1c1b85 (patch)
tree4cba33a8e7756a584e0e381ff136d10b75a88fa6 /hw/net/rocker
parent0c8f86ea98945678622c6e4b070c4218a53a0d19 (diff)
net/rocker: Fix the unusual macro name
Cc: jasowang@redhat.com Cc: jiri@resnulli.us Cc: armbru@redhat.com Cc: f4bug@amsat.org Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/rocker')
-rw-r--r--hw/net/rocker/rocker.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
index bb38cba0cb..9273473d59 100644
--- a/hw/net/rocker/rocker.c
+++ b/hw/net/rocker/rocker.c
@@ -69,10 +69,10 @@ struct rocker {
QLIST_ENTRY(rocker) next;
};
-#define ROCKER "rocker"
+#define TYPE_ROCKER "rocker"
-#define to_rocker(obj) \
- OBJECT_CHECK(Rocker, (obj), ROCKER)
+#define ROCKER(obj) \
+ OBJECT_CHECK(Rocker, (obj), TYPE_ROCKER)
static QLIST_HEAD(, rocker) rockers;
@@ -1285,7 +1285,7 @@ static World *rocker_world_type_by_name(Rocker *r, const char *name)
static void pci_rocker_realize(PCIDevice *dev, Error **errp)
{
- Rocker *r = to_rocker(dev);
+ Rocker *r = ROCKER(dev);
const MACAddr zero = { .a = { 0, 0, 0, 0, 0, 0 } };
const MACAddr dflt = { .a = { 0x52, 0x54, 0x00, 0x12, 0x35, 0x01 } };
static int sw_index;
@@ -1331,7 +1331,7 @@ static void pci_rocker_realize(PCIDevice *dev, Error **errp)
/* validate switch properties */
if (!r->name) {
- r->name = g_strdup(ROCKER);
+ r->name = g_strdup(TYPE_ROCKER);
}
if (rocker_find(r->name)) {
@@ -1427,7 +1427,7 @@ err_world_type_by_name:
static void pci_rocker_uninit(PCIDevice *dev)
{
- Rocker *r = to_rocker(dev);
+ Rocker *r = ROCKER(dev);
int i;
QLIST_REMOVE(r, next);
@@ -1460,7 +1460,7 @@ static void pci_rocker_uninit(PCIDevice *dev)
static void rocker_reset(DeviceState *dev)
{
- Rocker *r = to_rocker(dev);
+ Rocker *r = ROCKER(dev);
int i;
for (i = 0; i < ROCKER_WORLD_TYPE_MAX; i++) {
@@ -1498,7 +1498,7 @@ static Property rocker_properties[] = {
};
static const VMStateDescription rocker_vmsd = {
- .name = ROCKER,
+ .name = TYPE_ROCKER,
.unmigratable = 1,
};
@@ -1521,7 +1521,7 @@ static void rocker_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo rocker_info = {
- .name = ROCKER,
+ .name = TYPE_ROCKER,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(Rocker),
.class_init = rocker_class_init,