Skip to contentSkip to conversation

fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL

PATCH New [email protected] 1 participant 1 message Sep 5, 2014 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL

From: Mark Charlebois <[email protected]>

cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a warning about an overflow in XFORM.

---
 fs/compat_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/compat_ioctl.c +1 -1
index afec645..f6ce1aa 100644
@@ -810,7 +810,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
Signature · 1 line
1.9.1