summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-09-17 13:47:54 +0300
committerLinus Walleij <linus.walleij@linaro.org>2013-09-23 10:47:14 +0200
commit81d36c4fff7401b099d98818a517ee6bc02e93f2 (patch)
tree0a651cb3b5318186bfa4ac1388d2a32a1db88504 /drivers/pinctrl
parent3b59e432ec9c093311e0ad057e330e04feb79007 (diff)
pinctrl: remove an unnecessary cast
sizeof() is already size_t so there is no need to cast here. Generally, casting inside the min() macro instead of using min_t() is considered bad style. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index 1664e7865b9..b8fcc38c0d1 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -508,7 +508,7 @@ static ssize_t pinconf_dbg_config_write(struct file *file,
int i;
/* Get userspace string and assure termination */
- buf_size = min(count, (size_t)(sizeof(buf)-1));
+ buf_size = min(count, sizeof(buf) - 1);
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
buf[buf_size] = 0;