CC: [email protected] BCC: [email protected] CC: [email protected] TO: Denis Efremov <[email protected]> CC: Julia Lawall <[email protected]> CC: Evgeniy Polyakov <[email protected]> CC: "Greg Kroah-Hartman" <[email protected]> CC: Bhaskar Chowdhury <[email protected]> CC: Randy Dunlap <[email protected]> CC: Dan Carpenter <[email protected]> CC: [email protected]
From: kernel test robot <[email protected]> drivers/w1/slaves/w1_therm.c:1452:18-19: 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: 9137eda53752ef73148e42b0d7640a00f1bc96b1 commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script :::::: branch date: 14 hours ago :::::: commit date: 10 months ago Please take the patch only if it's a positive warning. Thanks! drivers/w1/slaves/w1_therm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c @@ -1449,7 +1449,7 @@ static int trigger_bulk_read(struct w1_m if (bulk_read_support(sl)) { int t_cur = conversion_time(sl); - t_conv = t_cur > t_conv ? t_cur : t_conv; + t_conv = max(t_cur, t_conv); strong_pullup = strong_pullup || (w1_strong_pullup == 2 || (!SLAVE_POWERMODE(sl) && _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
