lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH linux-next] mm/slab_common: Remove the unneeded result variable
Date
From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value from __kmem_cache_shrink() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
mm/slab_common.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/mm/slab_common.c b/mm/slab_common.c
index 17996649cfe3..0dfa3cfb6be5 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -495,13 +495,9 @@ EXPORT_SYMBOL(kmem_cache_destroy);
*/
int kmem_cache_shrink(struct kmem_cache *cachep)
{
- int ret;
-
-
kasan_cache_shrink(cachep);
- ret = __kmem_cache_shrink(cachep);

- return ret;
+ return __kmem_cache_shrink(cachep);
}
EXPORT_SYMBOL(kmem_cache_shrink);

--
2.25.1
\
 
 \ /
  Last update: 2022-08-23 09:53    [W:0.043 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site