mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: fsl-mc: bus: make checkpatch coding style problem free
@ 2016-05-08 20:44 John Rama
  0 siblings, 0 replies; only message in thread
From: John Rama @ 2016-05-08 20:44 UTC (permalink / raw)
  To: J. German Rivera, Stuart Yoder; +Cc: linux-kernel, John Rama

fixed following coding style problems.

    $checkpatch.pl drivers/staging/fsl-mc/bus/*.c

    -----------------------------------
    drivers/staging/fsl-mc/bus/dprc-driver.c
    -----------------------------------
    CHECK: Alignment should match open parenthesis
    +       if (mc_bus->dprc_attr.version.major < DPRC_MIN_VER_MAJOR ||
    +          (mc_bus->dprc_attr.version.major == DPRC_MIN_VER_MAJOR &&

    -----------------------------------
    drivers/staging/fsl-mc/bus/mc-msi.c
    -----------------------------------
    CHECK: Comparison to NULL could be written "!ops->set_desc"
    +       if (ops->set_desc == NULL)

    CHECK: Comparison to NULL could be written "!chip->irq_write_msi_msg"
    +       if (chip->irq_write_msi_msg == NULL)
---
 drivers/staging/fsl-mc/bus/dprc-driver.c | 4 ++--
 drivers/staging/fsl-mc/bus/mc-msi.c      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 7fc4717..c2b4573 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -711,8 +711,8 @@ static int dprc_probe(struct fsl_mc_device *mc_dev)
 	}
 
 	if (mc_bus->dprc_attr.version.major < DPRC_MIN_VER_MAJOR ||
-	   (mc_bus->dprc_attr.version.major == DPRC_MIN_VER_MAJOR &&
-	    mc_bus->dprc_attr.version.minor < DPRC_MIN_VER_MINOR)) {
+	    (mc_bus->dprc_attr.version.major == DPRC_MIN_VER_MAJOR &&
+	     mc_bus->dprc_attr.version.minor < DPRC_MIN_VER_MINOR)) {
 		dev_err(&mc_dev->dev,
 			"ERROR: DPRC version %d.%d not supported\n",
 			mc_bus->dprc_attr.version.major,
diff --git a/drivers/staging/fsl-mc/bus/mc-msi.c b/drivers/staging/fsl-mc/bus/mc-msi.c
index e202b2b..56f85c3 100644
--- a/drivers/staging/fsl-mc/bus/mc-msi.c
+++ b/drivers/staging/fsl-mc/bus/mc-msi.c
@@ -37,7 +37,7 @@ static void fsl_mc_msi_update_dom_ops(struct msi_domain_info *info)
 	/*
 	 * set_desc should not be set by the caller
 	 */
-	if (ops->set_desc == NULL)
+	if (!ops->set_desc)
 		ops->set_desc = fsl_mc_msi_set_desc;
 }
 
@@ -127,7 +127,7 @@ static void fsl_mc_msi_update_chip_ops(struct msi_domain_info *info)
 	/*
 	 * irq_write_msi_msg should not be set by the caller
 	 */
-	if (chip->irq_write_msi_msg == NULL)
+	if (!chip->irq_write_msi_msg)
 		chip->irq_write_msi_msg = fsl_mc_msi_write_msg;
 }
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-08 20:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-08 20:44 [PATCH] staging: fsl-mc: bus: make checkpatch coding style problem free John Rama

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®