CC: kbuild-all(a)lists.01.org BCC: lkp(a)intel.com TO: cros-kernel-buildreports(a)googlegroups.com From: kernel test robot 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 Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://android.googlesource.com/kernel/common android13-5.15 head: 96f47dce39cbeca32c76a3ef784ab4b72100215e commit: a1537a68c5010553002f62fad91c7c0c886c73d8 [6/19] FROMLIST: mm: multi-gen LRU: minimal implementation :::::: branch date: 4 hours ago :::::: commit date: 9 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)