From: Jingoo Han Date: Tue, 6 Aug 2013 09:10:20 +0000 (+0900) Subject: pinctrl: pinconf: fix comparison of different types X-Git-Tag: accepted/tizen/common/20141203.182822~1588^2~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b6803542e1bd544289d605c84233a0e0a46ac7d;p=platform%2Fkernel%2Flinux-arm64.git 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: Jingoo Han Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index d16ef87..8da2d6d 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c @@ -512,7 +512,7 @@ static int pinconf_dbg_config_write(struct file *file, int i; /* 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)) return -EFAULT; buf[buf_size] = 0;