diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-07 20:12:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-07 20:12:15 -0700 |
commit | a68a7509d3af8ee458d32b2416b0c2aaf2a4a7e3 (patch) | |
tree | a0e6a40ff4c384364d9eca02d490eab7dca21eee /include | |
parent | 639b4ac691c6f6e48921dc576379c176f82f3250 (diff) | |
parent | fd49c81f080a997aad4b0e73541cd42772b6a772 (diff) |
Merge tag 'vfio-v3.16-rc1' of git://github.com/awilliam/linux-vfio into next
Pull VFIO updates from Alex Williamson:
"A handful of VFIO bug fixes for v3.16"
* tag 'vfio-v3.16-rc1' of git://github.com/awilliam/linux-vfio:
drivers/vfio/pci: Fix wrong MSI interrupt count
drivers/vfio: Rework offsetofend()
vfio/iommu_type1: Avoid overflow
vfio/pci: Fix unchecked return value
vfio/pci: Fix sizing of DPA and THP express capabilities
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/vfio.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/vfio.h b/include/linux/vfio.h index 81022a52bc34..8ec980b5e3af 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h @@ -86,9 +86,8 @@ extern void vfio_unregister_iommu_driver( * from user space. This allows us to easily determine if the provided * structure is sized to include various fields. */ -#define offsetofend(TYPE, MEMBER) ({ \ - TYPE tmp; \ - offsetof(TYPE, MEMBER) + sizeof(tmp.MEMBER); }) \ +#define offsetofend(TYPE, MEMBER) \ + (offsetof(TYPE, MEMBER) + sizeof(((TYPE *)0)->MEMBER)) /* * External user API |