Skip to content

Commit

Permalink
of: del redundant type conversion
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
xiaojiangfeng authored and Rob Herring committed Apr 29, 2019
1 parent f52e30e commit b827bcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b827bcb

Please sign in to comment.