of: del redundant type conversion
authorxiaojiangfeng <xiaojiangfeng@huawei.com>
Wed, 10 Apr 2019 08:29:41 +0000 (16:29 +0800)
committerRob Herring <robh@kernel.org>
Mon, 29 Apr 2019 17:50:20 +0000 (12:50 -0500)
The type of variable l in early_init_dt_scan_chosen is
int, there is no need to convert to int.

Signed-off-by: xiaojiangfeng <xiaojiangfeng@huawei.com>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/fdt.c

index 4734223..de893c9 100644 (file)
@@ -1091,7 +1091,7 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
        /* Retrieve command line */
        p = of_get_flat_dt_prop(node, "bootargs", &l);
        if (p != NULL && l > 0)
-               strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
+               strlcpy(data, p, min(l, COMMAND_LINE_SIZE));
 
        /*
         * CONFIG_CMDLINE is meant to be a default in case nothing else