diff options
author | Robert Mustacchi <rm@joyent.com> | 2011-06-08 12:49:42 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2011-06-08 12:49:42 -0700 |
commit | fc81a7032577914bac149316323d225e6c268a18 (patch) | |
tree | b653340be716504ab3551a85a00377c20c6b1c74 /kvm_lapic.c | |
parent | ce88b2d2a6af27fd7873e2ff5c41c0ac387cddbe (diff) | |
download | illumos-kvm-fc81a7032577914bac149316323d225e6c268a18.tar.gz |
HVM-328 replace container_of with offsetof calculations
Diffstat (limited to 'kvm_lapic.c')
-rw-r--r-- | kvm_lapic.c | 8 |
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 |