summaryrefslogtreecommitdiff
path: root/kvm_lapic.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-06-08 12:49:42 -0700
committerRobert Mustacchi <rm@joyent.com>2011-06-08 12:49:42 -0700
commitfc81a7032577914bac149316323d225e6c268a18 (patch)
treeb653340be716504ab3551a85a00377c20c6b1c74 /kvm_lapic.c
parentce88b2d2a6af27fd7873e2ff5c41c0ac387cddbe (diff)
downloadillumos-kvm-fc81a7032577914bac149316323d225e6c268a18.tar.gz
HVM-328 replace container_of with offsetof calculations
Diffstat (limited to 'kvm_lapic.c')
-rw-r--r--kvm_lapic.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kvm_lapic.c b/kvm_lapic.c
index 5b5278c..ec122df 100644
--- a/kvm_lapic.c
+++ b/kvm_lapic.c
@@ -600,12 +600,8 @@ __apic_read(struct kvm_lapic *apic, unsigned int offset)
static inline struct kvm_lapic *
to_lapic(struct kvm_io_device *dev)
{
-#ifdef XXX
- return (container_of(dev, struct kvm_lapic, dev));
-#else
- XXX_KVM_PROBE;
- return (dev->lapic);
-#endif
+ return ((struct kvm_lapic *)((uintptr_t)dev -
+ offsetof(struct kvm_lapic, dev)));
}
int