diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 03:10:40 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 03:10:40 +0400 |
commit | f7493e5d9cc10ac97cf1f1579fdc14117460b40b (patch) | |
tree | 5c73bd9418b24398b33c5eb2c2fb3ea749d8c631 /fs/namei.c | |
parent | 989412bbd2835f1475d1528846693eddbac744c8 (diff) | |
download | linux-f7493e5d9cc10ac97cf1f1579fdc14117460b40b.tar.xz |
vfs: tidy up sparse warnings in fs/namei.c
While doing the fs/namei.c cleanups, I ran sparse on it, and it pointed
out other large integers and a couple of cases of us using '0' instead
of the proper 'NULL'.
Sparse still doesn't understand some of the conditional locking going
on, but that's no excuse for not fixing up the trivial stuff.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index 99a34717b2b0..73ec863a9896 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -161,7 +161,7 @@ static char *getname_flags(const char __user *filename, int flags, int *empty) char *getname(const char __user * filename) { - return getname_flags(filename, 0, 0); + return getname_flags(filename, 0, NULL); } #ifdef CONFIG_AUDITSYSCALL @@ -1408,7 +1408,7 @@ static inline int can_lookup(struct inode *inode) */ static inline long count_masked_bytes(unsigned long mask) { - return mask*0x0001020304050608 >> 56; + return mask*0x0001020304050608ul >> 56; } static inline unsigned int fold_hash(unsigned long hash) @@ -1972,7 +1972,7 @@ int user_path_at_empty(int dfd, const char __user *name, unsigned flags, int user_path_at(int dfd, const char __user *name, unsigned flags, struct path *path) { - return user_path_at_empty(dfd, name, flags, path, 0); + return user_path_at_empty(dfd, name, flags, path, NULL); } static int user_path_parent(int dfd, const char __user *path, |