w1: w1_therm: Use max() instead of doing it manually

Fix following coccicheck warning:
drivers/w1/slaves/w1_therm.c:1452:18-19: WARNING opportunity for max()

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1646908169-8050-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
This commit is contained in:
Haowen Bai 2022-03-10 18:29:29 +08:00 committed by Krzysztof Kozlowski
parent 83f3fcf96f
commit 1aa75bf517

View File

@ -1512,7 +1512,7 @@ static int trigger_bulk_read(struct w1_master *dev_master)
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) &&