staging: fsl-mc: bus: Drop warning
authorMatthias Brugger <mbrugger@suse.com>
Thu, 14 Apr 2016 21:24:26 +0000 (23:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 01:02:23 +0000 (18:02 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/mc-msi.c

index ba48add505366e00c6939408410ffdf45c4ca191..e202b2b88c638a4f614b72cf02545be809eddfea 100644 (file)
@@ -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;
 }
 
 /**