Re: [PATCH] mm/swap_slots.c: Remove unnecessary NULL pointer check

2021-01-13 Thread Miaohe Lin
Hi: On 2021/1/10 1:40, Matthew Wilcox wrote: > On Sat, Jan 09, 2021 at 03:09:43AM -0500, Miaohe Lin wrote: >> The cache->slots and cache->slots_ret is already checked before we try to >> drain it. And kvfree can handle the NULL pointer itself. So remove the >> NULL pointer check here. > >> @@ -178

Re: [PATCH] mm/swap_slots.c: Remove unnecessary NULL pointer check

2021-01-09 Thread Matthew Wilcox
On Sat, Jan 09, 2021 at 03:09:43AM -0500, Miaohe Lin wrote: > The cache->slots and cache->slots_ret is already checked before we try to > drain it. And kvfree can handle the NULL pointer itself. So remove the > NULL pointer check here. > @@ -178,7 +178,7 @@ static void drain_slots_cache_cpu(unsign

[PATCH] mm/swap_slots.c: Remove unnecessary NULL pointer check

2021-01-09 Thread Miaohe Lin
The cache->slots and cache->slots_ret is already checked before we try to drain it. And kvfree can handle the NULL pointer itself. So remove the NULL pointer check here. Signed-off-by: Miaohe Lin --- mm/swap_slots.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/sw