* [PATCH] fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL
@ 2014-09-24 3:47 Behan Webster
0 siblings, 0 replies; 2+ messages in thread
From: Behan Webster @ 2014-09-24 3:47 UTC (permalink / raw)
To: viro; +Cc: behanw, linux-fsdevel, linux-kernel, Mark Charlebois
From: Mark Charlebois <charlebm@gmail.com>
cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a warning
about an overflow in XFORM.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
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 afec645..f6ce1aa 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL
@ 2014-09-05 23:36 behanw
0 siblings, 0 replies; 2+ messages in thread
From: behanw @ 2014-09-05 23:36 UTC (permalink / raw)
To: viro
Cc: linux-fsdevel, linux-kernel, torvalds, Mark Charlebois, Behan Webster
From: Mark Charlebois <charlebm@gmail.com>
cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a warning
about an overflow in XFORM.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
---
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 afec645..f6ce1aa 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-24 3:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 3:47 [PATCH] fs, LLVMLinux: Remove warning from COMPATIBLE_IOCTL Behan Webster
-- strict thread matches above, loose matches on Subject: below --
2014-09-05 23:36 behanw
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).