From: Russell King 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 Cc: Manfred Spraul Cc: Hugh Dickins Signed-off-by: Andrew Morton --- include/linux/mm.h | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff -puN include/linux/mm.h~shut-up-warnings-in-ipc-shmc include/linux/mm.h --- devel/include/linux/mm.h~shut-up-warnings-in-ipc-shmc 2005-11-22 22:30:25.000000000 -0800 +++ devel-akpm/include/linux/mm.h 2005-11-22 22:30:25.000000000 -0800 @@ -633,9 +633,24 @@ struct mempolicy *shmem_get_policy(struc int shmem_lock(struct file *file, int lock, struct user_struct *user); #else #define shmem_nopage filemap_nopage -#define shmem_lock(a, b, c) ({0;}) /* always in memory, no need to lock */ -#define shmem_set_policy(a, b) (0) -#define shmem_get_policy(a, b) (NULL) + +static inline int shmem_lock(struct file *file, int lock, + struct user_struct *user) +{ + return 0; +} + +static inline int shmem_set_policy(struct vm_area_struct *vma, + struct mempolicy *new) +{ + return 0; +} + +static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, + unsigned long addr) +{ + return NULL; +} #endif struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); _