aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-02-01 18:52:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-02 19:03:19 -0500
commit1a44bc8c7cfe69756a116d38aef992d50fc1969d (patch)
tree3e830a7fe2f4b57e425421b35c6faebbbb2c7cc2 /include/linux/fs.h
parent3751d60430fe4c26460a5ca8ad8672d32f93bcb1 (diff)
vfs: sparse: remove a warning on OPEN_FMODE()
AND-ing FMODE_* constant with normal integer results in following sparse warnings. Fix it. fs/open.c:662:21: warning: restricted fmode_t degrades to integer fs/anon_inodes.c:123:34: warning: restricted fmode_t degrades to integer Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 32b38cd829d3..675678a01f50 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2555,9 +2555,11 @@ int proc_nr_inodes(struct ctl_table *table, int write,
2555 void __user *buffer, size_t *lenp, loff_t *ppos); 2555 void __user *buffer, size_t *lenp, loff_t *ppos);
2556int __init get_filesystem_list(char *buf); 2556int __init get_filesystem_list(char *buf);
2557 2557
2558#define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY)
2559
2558#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) 2560#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
2559#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ 2561#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
2560 (flag & FMODE_NONOTIFY))) 2562 (flag & __FMODE_NONOTIFY)))
2561 2563
2562#endif /* __KERNEL__ */ 2564#endif /* __KERNEL__ */
2563#endif /* _LINUX_FS_H */ 2565#endif /* _LINUX_FS_H */