From 2cec2dfff6dc4c5f33ac03f62b6dbb1516ad3d01 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 7 Oct 2003 00:47:20 -0700 Subject: [PATCH] [PATCH] fix warning in mm/memory for SWAP=n Avoid "statement with no effect" warning by making the macro that doesn't do anything an inline function instead. --- include/linux/swap.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 1f3517e965f3d..1ecc25d2fc636 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -261,12 +261,16 @@ extern spinlock_t swaplock; #define lookup_swap_cache(swp) NULL #define valid_swaphandles(swp, off) 0 #define can_share_swap_page(p) 0 -#define remove_exclusive_swap_page(p) 0 #define move_to_swap_cache(p, swp) 1 #define move_from_swap_cache(p, i, m) 1 #define __delete_from_swap_cache(p) /*NOTHING*/ #define delete_from_swap_cache(p) /*NOTHING*/ +static inline int remove_exclusive_swap_page(struct page *p) +{ + return 0; +} + static inline swp_entry_t get_swap_page(void) { swp_entry_t entry; -- 2.53.0