CC: [email protected] BCC: [email protected] CC: [email protected] TO: Denis Efremov <[email protected]> CC: Julia Lawall <[email protected]> CC: Thomas Gleixner <[email protected]> CC: [email protected]
From: kernel test robot <[email protected]> kernel/time/clockevents.c:75:12-13: 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: Denis Efremov <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 23d04328444a8fa0ca060c5e532220dac8e8bc26 commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script :::::: branch date: 10 hours ago :::::: commit date: 10 months ago Please take the patch only if it's a positive warning. Thanks! kernel/time/clockevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -72,7 +72,7 @@ static u64 cev_delta2ns(unsigned long la do_div(clc, evt->mult); /* Deltas less than 1usec are pointless noise */ - return clc > 1000 ? clc : 1000; + return max(clc, 1000); } /** _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
