From: Mark Charlebois Date: Fri, 28 Apr 2017 22:15:12 +0000 (-0700) Subject: fs: compat: Remove warning from COMPATIBLE_IOCTL X-Git-Tag: v4.1.52~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d08316187877a8c70628f0d23f5eadf1269faa4;p=thirdparty%2Fkernel%2Fstable.git fs: compat: Remove warning from COMPATIBLE_IOCTL [ Upstream commit 9280cdd6fe5b8287a726d24cc1d558b96c8491d7 ] cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a warning about an overflow in XFORM. From: Mark Charlebois Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster Signed-off-by: Matthias Kaehlcke Acked-by: Arnd Bergmann Signed-off-by: Al Viro Signed-off-by: Sasha Levin --- diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 6b8e2f091f5b8..5e6798a3c9b6f 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -811,7 +811,7 @@ static int compat_ioctl_preallocate(struct file *file, */ #define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff) -#define COMPATIBLE_IOCTL(cmd) XFORM(cmd), +#define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd), /* ioctl should not be warned about even if it's not implemented. Valid reasons to use this: - It is implemented with ->compat_ioctl on some device, but programs