Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/android: remove redundant ret variable

Return value from list_lru_count() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Link: https://lore.kernel.org/r/20220104113500.602158-1-chi.minghao@zte.com.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Minghao Chi and committed by
Greg Kroah-Hartman
b2fb28de abaca317

+2 -6
+2 -6
drivers/android/binder_alloc.c
··· 1049 1049 static unsigned long 1050 1050 binder_shrink_count(struct shrinker *shrink, struct shrink_control *sc) 1051 1051 { 1052 - unsigned long ret = list_lru_count(&binder_alloc_lru); 1053 - return ret; 1052 + return list_lru_count(&binder_alloc_lru); 1054 1053 } 1055 1054 1056 1055 static unsigned long 1057 1056 binder_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) 1058 1057 { 1059 - unsigned long ret; 1060 - 1061 - ret = list_lru_walk(&binder_alloc_lru, binder_alloc_free_page, 1058 + return list_lru_walk(&binder_alloc_lru, binder_alloc_free_page, 1062 1059 NULL, sc->nr_to_scan); 1063 - return ret; 1064 1060 } 1065 1061 1066 1062 static struct shrinker binder_shrinker = {