Commit 1aa75bf5 authored by Haowen Bai's avatar Haowen Bai Committed by Krzysztof Kozlowski
Browse files

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: default avatarHaowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1646908169-8050-1-git-send-email-baihaowen@meizu.com


Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
parent 83f3fcf9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) &&