Commit 2cec2dff authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[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.
parent 9b80ac47
...@@ -261,12 +261,16 @@ extern spinlock_t swaplock; ...@@ -261,12 +261,16 @@ extern spinlock_t swaplock;
#define lookup_swap_cache(swp) NULL #define lookup_swap_cache(swp) NULL
#define valid_swaphandles(swp, off) 0 #define valid_swaphandles(swp, off) 0
#define can_share_swap_page(p) 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_to_swap_cache(p, swp) 1
#define move_from_swap_cache(p, i, m) 1 #define move_from_swap_cache(p, i, m) 1
#define __delete_from_swap_cache(p) /*NOTHING*/ #define __delete_from_swap_cache(p) /*NOTHING*/
#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) static inline swp_entry_t get_swap_page(void)
{ {
swp_entry_t entry; swp_entry_t entry;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment