Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5489370yba; Wed, 10 Apr 2019 22:11:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhuVk2C/TnsDMatvSNs6BJsqHZ1Bf+fu3CrBEVWkPmFNK98LhIq/IrNQg2gEObYtO1T5Cl X-Received: by 2002:a63:c10d:: with SMTP id w13mr45192963pgf.311.1554959463634; Wed, 10 Apr 2019 22:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554959463; cv=none; d=google.com; s=arc-20160816; b=x7/XUyrXEM9zXBIk0D8x+FjyLYAcPHKo1lpyj9VgLI7RKgywb1qQ4P0Kizsn2I8HGa gr4Ov4NQU4BKzEHZOhdYDDtGekX2A1xxsu8GeMD/DD7Ixi0beCLzOiKtxjLNJJiSwFDz zNNVCm1/BjMZ6lrCD7p9OFUbEOVW4fvlG5L70S7qF3beVoJI7zWV0Dj9QiyaJ4ptUbfX jd4d/iibWys586/r2iqZUZo9BpIqM7peB5cnnnIOK3mI70FcUrHBAzZNXMdAhXNuGjLA qtalq2EXu9Upxnh4JOe1np/8R5UIziLKhQUr/TsXO+0PmyOyJ9AXMJF1uqNJp840vTza Y7ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=WjpTWS/nBAHfAxR38WCKOfTkke2hLWdpvYeKGUVB66w=; b=jBmBcxDQSp8wBSPGBskRzIamYEA8n8lC5DvrUPlSt/fCctAJzZN3XKu5H9Sc2zY3CH HJ0d5GduiQkLxvRZoYCm0LTQLLvph4b8LeM2RWXRss0QkDXlv5MCaUmqirWHUlOctvoc PtyZqOTdkMPLLniHIq+VAG873EqMf9LWbWEUDF++nrG4jOWNL3c9J1/yTrUFVuVKLgxf YXdK8NRAdKMYTEIoDkTmv3rDXYEOH01OcEF0VEdQ/msy5W/x9aktI9fSSFDN5B6aM/zC Env+gj0Ekp/ijv35pzJm21IAQPRl34hiT2JpWpRow8F3AMTt2q0EatZJFWf294FqQeSa bGew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KcV2xIg+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si11083735pld.334.2019.04.10.22.10.47; Wed, 10 Apr 2019 22:11:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KcV2xIg+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbfDKFJw (ORCPT + 99 others); Thu, 11 Apr 2019 01:09:52 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45011 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbfDKFJw (ORCPT ); Thu, 11 Apr 2019 01:09:52 -0400 Received: by mail-pf1-f193.google.com with SMTP id y13so2824173pfm.11; Wed, 10 Apr 2019 22:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WjpTWS/nBAHfAxR38WCKOfTkke2hLWdpvYeKGUVB66w=; b=KcV2xIg+u6qvlWKl+YUMCWNwh1ecKIqpZgE/SVHNDy6egNRWZn8IYZmInZrz6P5HMC YS8a65mlkEx0vMeuQ8m6HuTZNml4M71OSrSjIaBD2RUh42+27WvQudkGzWFO7mt/94cs vNtSdjoRJTOP/lASfP2aJpfDv9toZYA8CZN+GH1Bg6his7fGcEnJ3OvQZHUzQo9P70hd e6LI446H5cTfgBbv/ewPfbFfG6A4AXV5qDOdazrVgP5KfaRdpSDW8XxOb5NvfgqoPwAJ +kkW8IXUMg5nFO0l6n2aThkxbmVT/xiRhxhBUJuM7I/vOYsXsXx3kkrZEgPIYyUTG0c9 02Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WjpTWS/nBAHfAxR38WCKOfTkke2hLWdpvYeKGUVB66w=; b=f9zI1AfFhP2qP589U082HTGOpjMxUji0Dc3D69O7agOE18xZ4bm+3vsEZpaTafnoRc x8M8pglQ0hYYGQlbYIm77HZ+SfbqEmKXyz8kcwYNEMwtqKZ2WN/DJ2dCF2vFyinTb19V ECYqpWfYngHaRx1OmtJIvpGqyDUimdXPQq1zAHERRoK+OmCKtPjJutu4QZO1h1/ML6k0 /0O0LSzVJ/6duFkOycwvaa7lerMo+4NpQv9Lm4Dfex3Fu4KCU7NnKYSF++dEK6I8Hrro OAAlnYT6tVvoeZqhxdmQVTHFHJ4idShPEFhzN3Qc7HsUAyhgn8jsBm5RSi6c9fq0/k0P cG8A== X-Gm-Message-State: APjAAAXMt9+LnI+9z9tKYhaWo9sLs260eO8ZAbknu4JmhExioUWNmuOp 56HhmmKctntUfm7yRvuiGb4= X-Received: by 2002:a63:6fcd:: with SMTP id k196mr44790031pgc.238.1554959391987; Wed, 10 Apr 2019 22:09:51 -0700 (PDT) Received: from [192.168.1.70] (c-24-6-192-50.hsd1.ca.comcast.net. [24.6.192.50]) by smtp.gmail.com with ESMTPSA id z7sm17143119pgh.81.2019.04.10.22.09.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 22:09:51 -0700 (PDT) Subject: Re: [PATCH] of: del redundant type conversion To: xiaojiangfeng , robh+dt@kernel.org, robh@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1554884981-20309-1-git-send-email-xiaojiangfeng@huawei.com> From: Frank Rowand Message-ID: Date: Wed, 10 Apr 2019 22:09:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <1554884981-20309-1-git-send-email-xiaojiangfeng@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/10/19 1:29 AM, xiaojiangfeng wrote: > 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 > --- > 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 > My first reply to this patch asked for a sparse warning on this line to also be fixed. After xiaojiangfeng followed up with a different patch to try to resolve the issues with this line of code, I see that the sparse warning was not caused by my first conjecture and this patch is the correct one to apply. I will pursue the cause of the sparse warning myself separately. Reviewed-by: Frank Rowand