提交 e6d6cbe3 编写于 作者: C Christian Gromm 提交者: Greg Kroah-Hartman

staging: most: use min_t

This patch replaces min with min_t.
Signed-off-by: NChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 06e7ecf2
...@@ -246,7 +246,9 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset) ...@@ -246,7 +246,9 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
return -EIO; return -EIO;
} }
to_copy = min(count, (size_t)mbo->processed_length - channel->mbo_offs); to_copy = min_t(size_t,
count,
mbo->processed_length - channel->mbo_offs);
not_copied = copy_to_user(buf, not_copied = copy_to_user(buf,
mbo->virt_address + channel->mbo_offs, mbo->virt_address + channel->mbo_offs,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册