summaryrefslogtreecommitdiff
path: root/drivers/w1/slaves/w1_therm.c
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-03-10 13:29:29 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-05-08 09:14:51 +0300
commit1aa75bf5174c8243505a27476422060fce630cb1 (patch)
tree28c6f469b346797c2a0e71e3984a30a9955423d8 /drivers/w1/slaves/w1_therm.c
parent83f3fcf96fcc7e5405b37d9424c7ef26bfa203f8 (diff)
downloadlinux-1aa75bf5174c8243505a27476422060fce630cb1.tar.xz
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>
Diffstat (limited to 'drivers/w1/slaves/w1_therm.c')
-rw-r--r--drivers/w1/slaves/w1_therm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index 99c58bd9d2df..fa7c162c661f 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -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) &&