summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-11-25 18:49:03 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 09:41:29 -0600
commit7e2a363363338e7aed1de4d47a92222ba5c34048 (patch)
treece109252b3dfda5add1b80e8ea6bc5f3aec7d57d /hw
parente2b10e45488447eb3b8dd12205a798b0a4ab267c (diff)
downloadqemu-7e2a363363338e7aed1de4d47a92222ba5c34048.tar.gz
qemu-7e2a363363338e7aed1de4d47a92222ba5c34048.tar.bz2
qemu-7e2a363363338e7aed1de4d47a92222ba5c34048.zip
qdev: move DO_UPCAST() into osdep.h
Nothing qdev specific about this, make it available throughtout. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/qdev.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index 41642ee8a9..8d53754d48 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -154,16 +154,6 @@ CharDriverState *qdev_init_chardev(DeviceState *dev);
BusState *qdev_get_parent_bus(DeviceState *dev);
-/* Convert from a base type to a parent type, with compile time checking. */
-#ifdef __GNUC__
-#define DO_UPCAST(type, field, dev) ( __extension__ ( { \
- char __attribute__((unused)) offset_must_be_zero[ \
- -offsetof(type, field)]; \
- container_of(dev, type, field);}))
-#else
-#define DO_UPCAST(type, field, dev) container_of(dev, type, field)
-#endif
-
/*** BUS API. ***/
void qbus_create_inplace(BusState *bus, BusInfo *info,