Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

autofs: use unsigned int/long instead of uint/ulong for ioctl args

The standard types unsigned int and unsigned long should be used for
.compat_ioctl. autofs is the only fs using uing/ulong for this, and these
are even the only uint/ulong in the entire autofs code.

Drop unneeded long cast in return value of autofs_dev_ioctl_compat().
It's already long.

Link: http://lkml.kernel.org/r/150285069709.4670.3884827966280147529.stgit@pluto.themaw.net
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Tomohiro Kusumi and committed by
Linus Torvalds
b9fa2ad1 7ed1da84

+6 -4
+6 -4
fs/autofs4/dev-ioctl.c
··· 93 93 * at the end of the struct. 94 94 */ 95 95 static struct autofs_dev_ioctl * 96 - copy_dev_ioctl(struct autofs_dev_ioctl __user *in) 96 + copy_dev_ioctl(struct autofs_dev_ioctl __user *in) 97 97 { 98 98 struct autofs_dev_ioctl tmp, *res; 99 99 ··· 705 705 return err; 706 706 } 707 707 708 - static long autofs_dev_ioctl(struct file *file, uint command, ulong u) 708 + static long autofs_dev_ioctl(struct file *file, unsigned int command, 709 + unsigned long u) 709 710 { 710 711 int err; 711 712 ··· 715 714 } 716 715 717 716 #ifdef CONFIG_COMPAT 718 - static long autofs_dev_ioctl_compat(struct file *file, uint command, ulong u) 717 + static long autofs_dev_ioctl_compat(struct file *file, unsigned int command, 718 + unsigned long u) 719 719 { 720 - return (long) autofs_dev_ioctl(file, command, (ulong) compat_ptr(u)); 720 + return autofs_dev_ioctl(file, command, (unsigned long) compat_ptr(u)); 721 721 } 722 722 #else 723 723 #define autofs_dev_ioctl_compat NULL