From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Colin King <colin.king@canonical.com>
Cc: Stuart Yoder <stuyoder@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Wei Yongjun <weiyongjun1@huawei.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: fsl-mc: fix fsl_mc_is_allocatable strcmps
Date: Wed, 16 Aug 2017 13:37:55 +0000 [thread overview]
Message-ID: <59944AB2.6010809@nxp.com> (raw)
In-Reply-To: <20170816120654.p3mpezb3zr2eqxvw@mwanda>
On 08/16/2017 03:06 PM, Dan Carpenter wrote:
> On Wed, Aug 16, 2017 at 12:44:51PM +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The previous fix removed the equal to zero comparisons by the strcmps and
>> now the function always returns true. Fix this by adding in the missing
>> logical negation operators.
>>
>> Detected by CoverityScan, CID#1452267 ("Constant expression result")
>>
>> Fixes: b93ad9a067e1 ("staging: fsl-mc: be consistent when checking strcmp() return")
Thanks Colin (and Coverity) for catching this!
> Ugh... I did review the original patch at all. Sorry.
As a side note, funny how i got the patch description right but not the
actual patch. :-)
> It's better to use "== 0" because it's idiomatic.
Agree, plus this approach would be consistent with the rest of the
driver (except one place in drivers/staging/fsl-mc/bus/dprc-driver.c +32)
---
Best Regards, Laurentiu
next prev parent reply other threads:[~2017-08-16 13:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 11:44 [PATCH] staging: fsl-mc: fix fsl_mc_is_allocatable strcmps Colin King
2017-08-16 11:44 ` Colin King
2017-08-16 12:06 ` Dan Carpenter
2017-08-16 12:06 ` Dan Carpenter
2017-08-16 12:10 ` Dan Carpenter
2017-08-16 12:10 ` Dan Carpenter
2017-08-16 13:37 ` Laurentiu Tudor [this message]
2017-08-16 14:14 ` Colin Ian King
2017-08-16 14:14 ` Colin Ian King
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=59944AB2.6010809@nxp.com \
--to=laurentiu.tudor@nxp.com \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stuyoder@gmail.com \
--cc=weiyongjun1@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.