archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] fs: compat: Remove warning from COMPATIBLE_IOCTL
@ 2017-04-28 22:15 Matthias Kaehlcke
  0 siblings, 0 replies; only message in thread
From: Matthias Kaehlcke @ 2017-04-28 22:15 UTC (permalink / raw)
  To: Alexander Viro, Mark Charlebois, Behan Webster, Arnd Bergmann
  Cc: linux-kernel, linux-fsdevel, Matthias Kaehlcke

From: Mark Charlebois <>

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 <>
 fs/compat_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 11d087b2b28e..6116d5275a3e 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -833,7 +833,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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-28 22:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 22:15 [PATCH RESEND] fs: compat: Remove warning from COMPATIBLE_IOCTL Matthias Kaehlcke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).