CC: [email protected] BCC: [email protected] CC: [email protected] TO: Yu Zhao <[email protected]> CC: Johannes Weiner <[email protected]> CC: Andrew Morton <[email protected]> CC: Linux Memory Management List <[email protected]>
From: kernel test robot <[email protected]> mm/vmscan.c:3357: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://github.com/hnaz/linux-mm master head: e95841addbcb7f18df08f24940d4dadbff8a7ee6 commit: 49abaa5fc0a037958c119253b7e1ae32f05cadae [161/257] mm: multi-gen LRU: minimal implementation :::::: branch date: 3 days ago :::::: commit date: 3 days 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 @@ -3354,7 +3354,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]
