CC: [email protected] BCC: [email protected] TO: [email protected]
From: kernel test robot <[email protected]> mm/vmscan.c:3268:14-15: WARNING opportunity for max() Check for opencoded min(), max() implementations. Generated patches sometimes require adding a cast to fix compile warning. Warnings/patches scope intentionally limited to a function body. Generated by: scripts/coccinelle/misc/minmax.cocci CC: Yu Zhao <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://android.googlesource.com/kernel/common android13-5.15 head: 78d6de78638b6cf7771a98628648f8b29f6d8cab commit: a1537a68c5010553002f62fad91c7c0c886c73d8 [6/19] FROMLIST: mm: multi-gen LRU: minimal implementation :::::: branch date: 5 hours ago :::::: commit date: 6 weeks ago Please take the patch only if it's a positive warning. Thanks! mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3265,7 +3265,7 @@ static long get_nr_evictable(struct lruv else *need_aging = false; - return total > 0 ? total : 0; + return max(total, 0); } static void age_lruvec(struct lruvec *lruvec, struct scan_control *sc) _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
