提交 1002a240 编写于 作者: A Aybuke Ozdemir 提交者: Greg Kroah-Hartman

staging: media: omap24xx: Use min_t instead of min

This patch focuses on fixing the following warning generated by
checkpatch.pl for the file tcm825x.c:

WARNİNG: min() should probably be min_t(u32, tgt_xclk, TCM825X_XCLK_MAX)

The changes were applied using the following coccinelle rule:
@@
expression e1, e2;
typedef u32;
@@

-tgt_xclk = min(e1, (u32)e2);
+tgt_xclk = min_t(u32, e1, e2);
Signed-off-by: NAybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8d02c022
......@@ -751,7 +751,7 @@ static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p)
(2457 * tgt_fps) / MAX_FPS;
tgt_xclk *= 10000;
tgt_xclk = min(tgt_xclk, (u32)TCM825X_XCLK_MAX);
tgt_xclk = min_t(u32, tgt_xclk, TCM825X_XCLK_MAX);
tgt_xclk = max(tgt_xclk, (u32)TCM825X_XCLK_MIN);
p->u.bt656.clock_curr = tgt_xclk;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册