CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: "Christian König" <christian.koe...@amd.com>
CC: Rob Clark <robdcl...@gmail.com>
CC: Sean Paul <s...@poorly.run>
CC: David Airlie <airl...@linux.ie>
CC: Daniel Vetter <dan...@ffwll.ch>
CC: linux-arm-...@vger.kernel.org
CC: dri-de...@lists.freedesktop.org
CC: freedr...@lists.freedesktop.org
CC: linux-ker...@vger.kernel.org

From: kernel test robot <l...@intel.com>

drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c:141:14-16: WARNING opportunity for 
min()


 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

Reported-by: kernel test robot <l...@intel.com>
Signed-off-by: kernel test robot <l...@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   85c7000fda0029ec16569b1eec8fd3a8d026be73
commit: b3ed524f84f573ece1aa2f26e9db3c34a593e0d1 drm/msm: allow compile_test on 
!ARM
:::::: branch date: 5 hours ago
:::::: commit date: 6 months ago

Please take the patch only if it's a positive warning. Thanks!

 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
@@ -138,7 +138,7 @@ static inline u32 pll_get_integloop_gain
 
        base <<= digclk_divsel;
 
-       return (base <= 2046 ? base : 2046);
+       return min(base, 2046);
 }
 
 static inline u32 pll_get_pll_cmp(u64 fdata, unsigned long ref_clk)
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to