Commit f3bc52cb authored by Miaohe Lin's avatar Miaohe Lin Committed by Linus Torvalds

mm/swap_slots.c: remove always zero and unused return value of enable_swap_slots_cache()

enable_swap_slots_cache() always return zero and its return value is just
ignored by the caller.  So make enable_swap_slots_cache() void.
Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Link: https://lkml.kernel.org/r/20200924113554.50614-1-linmiaohe@huawei.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a3e7bea0
...@@ -23,7 +23,7 @@ struct swap_slots_cache { ...@@ -23,7 +23,7 @@ struct swap_slots_cache {
void disable_swap_slots_cache_lock(void); void disable_swap_slots_cache_lock(void);
void reenable_swap_slots_cache_unlock(void); void reenable_swap_slots_cache_unlock(void);
int enable_swap_slots_cache(void); void enable_swap_slots_cache(void);
int free_swap_slot(swp_entry_t entry); int free_swap_slot(swp_entry_t entry);
extern bool swap_slot_cache_enabled; extern bool swap_slot_cache_enabled;
......
...@@ -237,7 +237,7 @@ static int free_slot_cache(unsigned int cpu) ...@@ -237,7 +237,7 @@ static int free_slot_cache(unsigned int cpu)
return 0; return 0;
} }
int enable_swap_slots_cache(void) void enable_swap_slots_cache(void)
{ {
mutex_lock(&swap_slots_cache_enable_mutex); mutex_lock(&swap_slots_cache_enable_mutex);
if (!swap_slot_cache_initialized) { if (!swap_slot_cache_initialized) {
...@@ -255,7 +255,6 @@ int enable_swap_slots_cache(void) ...@@ -255,7 +255,6 @@ int enable_swap_slots_cache(void)
__reenable_swap_slots_cache(); __reenable_swap_slots_cache();
out_unlock: out_unlock:
mutex_unlock(&swap_slots_cache_enable_mutex); mutex_unlock(&swap_slots_cache_enable_mutex);
return 0;
} }
/* called with swap slot cache's alloc lock held */ /* called with swap slot cache's alloc lock held */
......
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