提交 9b680354 编写于 作者: J Jingoo Han 提交者: Linus Walleij

pinctrl: pinconf: fix comparison of different types

Fix the following sparse warning:

drivers/pinctrl/pinconf.c:521:20: error: incompatible types in comparison expression (different type sizes)
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 bcd0c8c2
...@@ -512,7 +512,7 @@ static int pinconf_dbg_config_write(struct file *file, ...@@ -512,7 +512,7 @@ static int pinconf_dbg_config_write(struct file *file,
int i; int i;
/* Get userspace string and assure termination */ /* Get userspace string and assure termination */
buf_size = min(count, (sizeof(buf)-1)); buf_size = min(count, (size_t)(sizeof(buf)-1));
if (copy_from_user(buf, user_buf, buf_size)) if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT; return -EFAULT;
buf[buf_size] = 0; buf[buf_size] = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册