linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Brugger <mbrugger@suse.com>
To: German.Rivera@freescale.com, gregkh@linuxfoundation.org
Cc: stuart.yoder@nxp.com, scott.wood@nxp.com, agraf@suse.de,
	linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	mbrugger@suse.com
Subject: [PATCH] staging: fsl-mc: bus: Drop warning
Date: Thu, 14 Apr 2016 23:24:26 +0200	[thread overview]
Message-ID: <1460669066-25247-1-git-send-email-mbrugger@suse.com> (raw)

When updating the irq_chip and msi_domain_ops, the code checkes for
already present functions.
When more then one ITS controller are present in the system,
irq_chip and msi_domain_ops got already set and a warning is invoked.

This patch deletes the warning, as the funtions are just already set to
the needed callbacks.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
---
 drivers/staging/fsl-mc/bus/mc-msi.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/mc-msi.c b/drivers/staging/fsl-mc/bus/mc-msi.c
index 3a8258f..c0933fe 100644
--- a/drivers/staging/fsl-mc/bus/mc-msi.c
+++ b/drivers/staging/fsl-mc/bus/mc-msi.c
@@ -37,10 +37,8 @@ static void fsl_mc_msi_update_dom_ops(struct msi_domain_info *info)
 	/*
 	 * set_desc should not be set by the caller
 	 */
-	if (WARN_ON(ops->set_desc))
-		return;
-
-	ops->set_desc = fsl_mc_msi_set_desc;
+	if (ops->set_desc == NULL)
+		ops->set_desc = fsl_mc_msi_set_desc;
 }
 
 static void __fsl_mc_msi_write_msg(struct fsl_mc_device *mc_bus_dev,
@@ -129,10 +127,8 @@ 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 (WARN_ON(chip->irq_write_msi_msg))
-		return;
-
-	chip->irq_write_msi_msg = fsl_mc_msi_write_msg;
+	if (chip->irq_write_msi_msg == NULL)
+		chip->irq_write_msi_msg = fsl_mc_msi_write_msg;
 }
 
 /**
-- 
2.6.6

             reply	other threads:[~2016-04-14 21:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 21:24 Matthias Brugger [this message]
2016-04-14 22:57 ` [PATCH] staging: fsl-mc: bus: Drop warning Stuart Yoder
2016-04-15 10:43   ` Matthias Brugger

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=1460669066-25247-1-git-send-email-mbrugger@suse.com \
    --to=mbrugger@suse.com \
    --cc=German.Rivera@freescale.com \
    --cc=agraf@suse.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scott.wood@nxp.com \
    --cc=stuart.yoder@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).