diff options
author | Russell King <rmk@arm.linux.org.uk> | 2006-01-06 03:10:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:24 -0500 |
commit | 03b00ebcc804180829d513df9e92e5fe8f72aacf (patch) | |
tree | 6ffa5de42322cca4b1823f7257647e70a4a166bb | |
parent | a94b3ab7eab4edcc9b2cb474b188f774c331adf7 (diff) |
[PATCH] Shut up warnings in ipc/shm.c
Fix two warnings in ipc/shm.c
ipc/shm.c:122: warning: statement with no effect
ipc/shm.c:560: warning: statement with no effect
by converting the macros to empty inline functions. For safety, let's do
all three. This also has the advantage that typechecking gets performed
even without CONFIG_SHMEM enabled.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/linux/mm.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 6c9be99429f3..75ec04e2f184 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -634,9 +634,24 @@ struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, | |||
634 | int shmem_lock(struct file *file, int lock, struct user_struct *user); | 634 | int shmem_lock(struct file *file, int lock, struct user_struct *user); |
635 | #else | 635 | #else |
636 | #define shmem_nopage filemap_nopage | 636 | #define shmem_nopage filemap_nopage |
637 | #define shmem_lock(a, b, c) ({0;}) /* always in memory, no need to lock */ | 637 | |
638 | #define shmem_set_policy(a, b) (0) | 638 | static inline int shmem_lock(struct file *file, int lock, |
639 | #define shmem_get_policy(a, b) (NULL) | 639 | struct user_struct *user) |
640 | { | ||
641 | return 0; | ||
642 | } | ||
643 | |||
644 | static inline int shmem_set_policy(struct vm_area_struct *vma, | ||
645 | struct mempolicy *new) | ||
646 | { | ||
647 | return 0; | ||
648 | } | ||
649 | |||
650 | static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, | ||
651 | unsigned long addr) | ||
652 | { | ||
653 | return NULL; | ||
654 | } | ||
640 | #endif | 655 | #endif |
641 | struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); | 656 | struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); |
642 | 657 | ||