diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2020-10-14 01:52:18 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-14 03:38:30 +0200 |
commit | f3bc52cb04bcfccd12da3f03ca8bc50484898436 (patch) | |
tree | 3694acdab30586bba0f7c7af86ba848fdc74871b /mm/swap_slots.c | |
parent | mm/swap.c: fix confusing comment in release_pages() (diff) | |
download | linux-f3bc52cb04bcfccd12da3f03ca8bc50484898436.tar.xz linux-f3bc52cb04bcfccd12da3f03ca8bc50484898436.zip |
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: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://lkml.kernel.org/r/20200924113554.50614-1-linmiaohe@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swap_slots.c')
-rw-r--r-- | mm/swap_slots.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/swap_slots.c b/mm/swap_slots.c index 3e6453573a89..0357fbe70645 100644 --- a/mm/swap_slots.c +++ b/mm/swap_slots.c @@ -237,7 +237,7 @@ static int free_slot_cache(unsigned int cpu) return 0; } -int enable_swap_slots_cache(void) +void enable_swap_slots_cache(void) { mutex_lock(&swap_slots_cache_enable_mutex); if (!swap_slot_cache_initialized) { @@ -255,7 +255,6 @@ int enable_swap_slots_cache(void) __reenable_swap_slots_cache(); out_unlock: mutex_unlock(&swap_slots_cache_enable_mutex); - return 0; } /* called with swap slot cache's alloc lock held */ |