All of lore.kernel.org
 help / color / mirror / Atom feed
From: <laurentiu.tudor@nxp.com>
To: <gregkh@linuxfoundation.org>, <stuyoder@gmail.com>
Cc: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>,
	<agraf@suse.de>, <ioana.ciornei@nxp.com>,
	<linux-arm-kernel@lists.infradead.org>,
	Laurentiu Tudor <laurentiu.tudor@nxp.com>
Subject: [PATCH] staging: fsl-mc: be consistent when checking strcmp() returns
Date: Thu, 17 Aug 2017 14:55:04 +0300	[thread overview]
Message-ID: <20170817115504.4308-1-laurentiu.tudor@nxp.com> (raw)

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Throughout the driver we use == 0 / != 0 to check strcmp() returns except
this place, so fix it.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
 drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 485abad..06df528 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -29,7 +29,7 @@ static bool fsl_mc_device_match(struct fsl_mc_device *mc_dev,
 				struct fsl_mc_obj_desc *obj_desc)
 {
 	return mc_dev->obj_desc.id == obj_desc->id &&
-	       !strcmp(mc_dev->obj_desc.type, obj_desc->type);
+	       strcmp(mc_dev->obj_desc.type, obj_desc->type) == 0;
 
 }
 
-- 
2.9.4

WARNING: multiple messages have this Message-ID (diff)
From: laurentiu.tudor@nxp.com (laurentiu.tudor at nxp.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] staging: fsl-mc: be consistent when checking strcmp() returns
Date: Thu, 17 Aug 2017 14:55:04 +0300	[thread overview]
Message-ID: <20170817115504.4308-1-laurentiu.tudor@nxp.com> (raw)

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Throughout the driver we use == 0 / != 0 to check strcmp() returns except
this place, so fix it.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
 drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 485abad..06df528 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -29,7 +29,7 @@ static bool fsl_mc_device_match(struct fsl_mc_device *mc_dev,
 				struct fsl_mc_obj_desc *obj_desc)
 {
 	return mc_dev->obj_desc.id == obj_desc->id &&
-	       !strcmp(mc_dev->obj_desc.type, obj_desc->type);
+	       strcmp(mc_dev->obj_desc.type, obj_desc->type) == 0;
 
 }
 
-- 
2.9.4

             reply	other threads:[~2017-08-17 11:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17 11:55 laurentiu.tudor [this message]
2017-08-17 11:55 ` [PATCH] staging: fsl-mc: be consistent when checking strcmp() returns laurentiu.tudor at nxp.com
2017-08-23  1:40 ` Greg KH
2017-08-23  1:40   ` Greg KH
2017-08-23  2:33   ` Joe Perches
2017-08-23  2:33     ` Joe Perches
2017-08-23  5:38     ` Greg KH
2017-08-23  5:38       ` Greg KH

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=20170817115504.4308-1-laurentiu.tudor@nxp.com \
    --to=laurentiu.tudor@nxp.com \
    --cc=agraf@suse.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuyoder@gmail.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.