linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: fsl-mc: bus: Drop warning
@ 2016-04-14 21:24 Matthias Brugger
  2016-04-14 22:57 ` Stuart Yoder
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Brugger @ 2016-04-14 21:24 UTC (permalink / raw)
  To: German.Rivera, gregkh
  Cc: stuart.yoder, scott.wood, agraf, linux-kernel, devel, mbrugger

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] staging: fsl-mc: bus: Drop warning
  2016-04-14 21:24 [PATCH] staging: fsl-mc: bus: Drop warning Matthias Brugger
@ 2016-04-14 22:57 ` Stuart Yoder
  2016-04-15 10:43   ` Matthias Brugger
  0 siblings, 1 reply; 3+ messages in thread
From: Stuart Yoder @ 2016-04-14 22:57 UTC (permalink / raw)
  To: Matthias Brugger, German.Rivera, gregkh
  Cc: Scott Wood, agraf, linux-kernel, devel



> -----Original Message-----
> From: Matthias Brugger [mailto:mbrugger@suse.com]
> Sent: Thursday, April 14, 2016 4:24 PM
> To: German.Rivera@freescale.com; gregkh@linuxfoundation.org
> Cc: Stuart Yoder <stuart.yoder@nxp.com>; Scott Wood <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
> 
> 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.

How can this situation happen?  And what do you mean by
multiple ITS controllers? ...multiple instances of the GIC ITS
on an SoC?

Stuart

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: fsl-mc: bus: Drop warning
  2016-04-14 22:57 ` Stuart Yoder
@ 2016-04-15 10:43   ` Matthias Brugger
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2016-04-15 10:43 UTC (permalink / raw)
  To: Stuart Yoder, German.Rivera, gregkh
  Cc: Scott Wood, agraf, linux-kernel, devel



On 15/04/16 00:57, Stuart Yoder wrote:
>
>
>> -----Original Message-----
>> From: Matthias Brugger [mailto:mbrugger@suse.com]
>> Sent: Thursday, April 14, 2016 4:24 PM
>> To: German.Rivera@freescale.com; gregkh@linuxfoundation.org
>> Cc: Stuart Yoder <stuart.yoder@nxp.com>; Scott Wood <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
>>
>> 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.
>
> How can this situation happen?  And what do you mean by
> multiple ITS controllers? ...multiple instances of the GIC ITS
> on an SoC?
>

Yes, there are two arm,gic-v3-its defined in the FDT.

~ # ll /proc/device-tree/interrupt-controller@8010\,00000000/
total 0
-r--r--r-- 1 root root  4 Apr 15 12:31 #address-cells
-r--r--r-- 1 root root 11 Apr 15 12:31 compatible
drwxr-xr-x 2 root root  0 Apr 15 12:31 gic-its@8010,00020000
drwxr-xr-x 2 root root  0 Apr 15 12:31 gic-its@9010,00020000
-r--r--r-- 1 root root  4 Apr 15 12:31 #interrupt-cells
-r--r--r-- 1 root root  0 Apr 15 12:31 interrupt-controller
-r--r--r-- 1 root root 12 Apr 15 12:31 interrupts
-r--r--r-- 1 root root  4 Apr 15 12:31 linux,phandle
-r--r--r-- 1 root root 21 Apr 15 12:31 name
-r--r--r-- 1 root root  4 Apr 15 12:31 phandle
-r--r--r-- 1 root root  0 Apr 15 12:31 ranges
-r--r--r-- 1 root root  4 Apr 15 12:31 #redistributor-regions
-r--r--r-- 1 root root 48 Apr 15 12:31 reg
-r--r--r-- 1 root root  4 Apr 15 12:31 #size-cells

Regards,
Matthias

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-15 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 21:24 [PATCH] staging: fsl-mc: bus: Drop warning Matthias Brugger
2016-04-14 22:57 ` Stuart Yoder
2016-04-15 10:43   ` Matthias Brugger

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).