lkml.org 
[lkml]   [2019]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] of: del redundant type conversion
Date
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>
---
drivers/of/fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 4734223..de893c9 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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
--
1.8.5.6
\
 
 \ /
  Last update: 2019-04-10 10:27    [W:0.060 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site