https://github.com/torvalds/linux
Revision c6ef7fd40eddad38a8825cbd6bb2ce8bdbba88f5 authored by Paul Gortmaker on 04 January 2017, 20:08:15 UTC, committed by Alex Williamson on 04 January 2017, 20:22:38 UTC
What appears to be a copy and paste error from the line above gets the ioctl a ssize_t return value instead of the traditional "int". The associated sample code used "long" which meant it would compile for x86-64 but not i386, with the latter failing as follows: CC [M] samples/vfio-mdev/mtty.o samples/vfio-mdev/mtty.c:1418:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .ioctl = mtty_ioctl, ^ samples/vfio-mdev/mtty.c:1418:20: note: (near initialization for ‘mdev_fops.ioctl’) cc1: some warnings being treated as errors Since in this case, vfio is working with struct file_operations; as such: long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); ...and so here we just standardize on long vs. the normal int that user space typically sees and documents as per "man ioctl" and similar. Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.") Cc: Kirti Wankhede <kwankhede@nvidia.com> Cc: Neo Jia <cjia@nvidia.com> Cc: kvm@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent e19f32d
Tip revision: c6ef7fd40eddad38a8825cbd6bb2ce8bdbba88f5 authored by Paul Gortmaker on 04 January 2017, 20:08:15 UTC
vfio-mdev: fix non-standard ioctl return val causing i386 build fail
vfio-mdev: fix non-standard ioctl return val causing i386 build fail
Tip revision: c6ef7fd
File | Mode | Size |
---|---|---|
Makefile | -rw-r--r-- | 383 bytes |
generic_mpih-add1.c | -rw-r--r-- | 2.0 KB |
generic_mpih-lshift.c | -rw-r--r-- | 2.1 KB |
generic_mpih-mul1.c | -rw-r--r-- | 1.9 KB |
generic_mpih-mul2.c | -rw-r--r-- | 1.9 KB |
generic_mpih-mul3.c | -rw-r--r-- | 1.9 KB |
generic_mpih-rshift.c | -rw-r--r-- | 2.1 KB |
generic_mpih-sub1.c | -rw-r--r-- | 2.0 KB |
longlong.h | -rw-r--r-- | 39.6 KB |
mpi-bit.c | -rw-r--r-- | 1.5 KB |
mpi-cmp.c | -rw-r--r-- | 1.6 KB |
mpi-inline.h | -rw-r--r-- | 3.3 KB |
mpi-internal.h | -rw-r--r-- | 7.8 KB |
mpi-pow.c | -rw-r--r-- | 8.4 KB |
mpicoder.c | -rw-r--r-- | 9.0 KB |
mpih-cmp.c | -rw-r--r-- | 2.0 KB |
mpih-div.c | -rw-r--r-- | 5.8 KB |
mpih-mul.c | -rw-r--r-- | 14.2 KB |
mpiutil.c | -rw-r--r-- | 2.7 KB |
Computing file changes ...