pinctrl: remove an unnecessary cast
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Sep 2013 10:47:54 +0000 (13:47 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 23 Sep 2013 08:47:14 +0000 (10:47 +0200)
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>
drivers/pinctrl/pinconf.c

index 1664e7865b9d9f1f735a9efe4e9cc9c6e0df0f28..b8fcc38c0d116a97cf2b6f4142b026f8b8f94afb 100644 (file)
@@ -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;