From: YueHaibing <yuehaibing@huawei.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
<leobras.c@gmail.co>, <radek.dostal@streamunlimited.co>,
<linux-fbdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v2 -next] staging: fbtft: use strcmp() instead of strncmp() for
Date: Tue, 18 Dec 2018 21:46:41 +0800 [thread overview]
Message-ID: <139ad344-095c-c754-bd17-782e4ede958d@huawei.com> (raw)
In-Reply-To: <20181218133747.GG15451@kadam>
On 2018/12/18 21:37, Dan Carpenter wrote:
> On Tue, Dec 18, 2018 at 09:25:08PM +0800, YueHaibing wrote:
>> strncmp() stops comparing when either the end of one of the first two
>> arguments is reached or when 'n' characters have been compared, whichever
>> comes first.That means that strncmp(s1, s2, n) is equivalent to
>> strcmp(s1, s2) if n exceeds the length of s1 or the length of s2.
>>
>> This patch avoids that the following warning is reported by smatch:
>>
>> drivers/staging/fbtft/fbtft_device.c:1458
>> fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32)
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>> v2: fix patch title
>
> v2 is worse than v1...
Yes, ...., I messed up.
I will fix it.
>
> v1 is a little long but I wouldn't have complained about it.
>
> Please assume that the subject and the commit message are separate
> things. Take a look how the patch description reads on marc.info:
>
> https://marc.info/?l=linux-driver-devel&m=154513957719226&w=2
>
> regards,
> dan carpenter
>
>
> .
>
prev parent reply other threads:[~2018-12-18 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 13:25 YueHaibing
2018-12-18 13:37 ` Dan Carpenter
2018-12-18 13:46 ` YueHaibing [this message]
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=139ad344-095c-c754-bd17-782e4ede958d@huawei.com \
--to=yuehaibing@huawei.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=leobras.c@gmail.co \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=radek.dostal@streamunlimited.co \
/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®