From: xiaojiangfeng <xiaojiangfeng@huawei.com>
To: <robh+dt@kernel.org>, <frowand.list@gmail.com>, <robh@kernel.org>,
<grant.likely@secretlab.ca>, <xiaojiangfeng@huawei.com>
Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] of: fix expression using sizeof(void)
Date: Thu, 11 Apr 2019 09:47:35 +0800 [thread overview]
Message-ID: <1554947255-80031-1-git-send-email-xiaojiangfeng@huawei.com> (raw)
problem detected by sparse:
drivers/of/fdt.c:1094:34: warning: expression using sizeof(void)
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..75c6c55 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, COMMAND_LINE_SIZE);
/*
* CONFIG_CMDLINE is meant to be a default in case nothing else
--
1.8.5.6
next reply other threads:[~2019-04-11 1:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 1:47 xiaojiangfeng [this message]
2019-04-11 5:06 ` Frank Rowand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1554947255-80031-1-git-send-email-xiaojiangfeng@huawei.com \
--to=xiaojiangfeng@huawei.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®