EDAC: Remove NO_IRQ from powerpc-only drivers
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 12 Sep 2016 10:00:36 +0000 (20:00 +1000)
committerBorislav Petkov <bp@suse.de>
Mon, 12 Sep 2016 11:04:56 +0000 (13:04 +0200)
We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it
from powerpc-only drivers.

The pdata structs are kzalloc'ed, so we don't need to initialise those
to 0, we can just drop the assignments entirely.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Johannes Thumshirn <morbidrsa@gmail.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: linuxppc-dev@ozlabs.org
Link: http://lkml.kernel.org/r/1473674436-19467-1-git-send-email-mpe@ellerman.id.au
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/mpc85xx_edac.c
drivers/edac/mv64x60_edac.c
drivers/edac/ppc4xx_edac.c

index 0a4020923684f448b95c8f6b78f0173b2b783f35..ff0567526ee3763740bd50e1df86ab80da1fb41b 100644 (file)
@@ -170,7 +170,6 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
 
        pdata = pci->pvt_info;
        pdata->name = "mpc85xx_pci_err";
-       pdata->irq = NO_IRQ;
 
        plat_data = op->dev.platform_data;
        if (!plat_data) {
@@ -491,7 +490,6 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
 
        pdata = edac_dev->pvt_info;
        pdata->name = "mpc85xx_l2_err";
-       pdata->irq = NO_IRQ;
        edac_dev->dev = &op->dev;
        dev_set_drvdata(edac_dev->dev, edac_dev);
        edac_dev->ctl_name = pdata->name;
index 6c54127e6eae79295b12277bec860aa1f9fb3cd2..cb9b8577acbcc04cd5880f2cc13b398db2814a4a 100644 (file)
@@ -118,7 +118,6 @@ static int mv64x60_pci_err_probe(struct platform_device *pdev)
 
        pdata->pci_hose = pdev->id;
        pdata->name = "mpc85xx_pci_err";
-       pdata->irq = NO_IRQ;
        platform_set_drvdata(pdev, pci);
        pci->dev = &pdev->dev;
        pci->dev_name = dev_name(&pdev->dev);
@@ -291,7 +290,6 @@ static int mv64x60_sram_err_probe(struct platform_device *pdev)
 
        pdata = edac_dev->pvt_info;
        pdata->name = "mv64x60_sram_err";
-       pdata->irq = NO_IRQ;
        edac_dev->dev = &pdev->dev;
        platform_set_drvdata(pdev, edac_dev);
        edac_dev->dev_name = dev_name(&pdev->dev);
@@ -459,7 +457,6 @@ static int mv64x60_cpu_err_probe(struct platform_device *pdev)
 
        pdata = edac_dev->pvt_info;
        pdata->name = "mv64x60_cpu_err";
-       pdata->irq = NO_IRQ;
        edac_dev->dev = &pdev->dev;
        platform_set_drvdata(pdev, edac_dev);
        edac_dev->dev_name = dev_name(&pdev->dev);
@@ -727,7 +724,6 @@ static int mv64x60_mc_err_probe(struct platform_device *pdev)
        mci->pdev = &pdev->dev;
        platform_set_drvdata(pdev, mci);
        pdata->name = "mv64x60_mc_err";
-       pdata->irq = NO_IRQ;
        mci->dev_name = dev_name(&pdev->dev);
        pdata->edac_idx = edac_mc_idx++;
 
index d3a64ba61fa3075beab3001d9270c572c8af9c9c..691ce25e9010566b11e8876927d8d231c6cd958b 100644 (file)
@@ -1029,8 +1029,6 @@ static int ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
        pdata                   = mci->pvt_info;
 
        pdata->dcr_host         = *dcr_host;
-       pdata->irqs.sec         = NO_IRQ;
-       pdata->irqs.ded         = NO_IRQ;
 
        /* Initialize controller capabilities and configuration */
 
@@ -1111,7 +1109,7 @@ static int ppc4xx_edac_register_irq(struct platform_device *op,
        ded_irq = irq_of_parse_and_map(np, INTMAP_ECCDED_INDEX);
        sec_irq = irq_of_parse_and_map(np, INTMAP_ECCSEC_INDEX);
 
-       if (ded_irq == NO_IRQ || sec_irq == NO_IRQ) {
+       if (!ded_irq || !sec_irq) {
                ppc4xx_edac_mc_printk(KERN_ERR, mci,
                                      "Unable to map interrupts.\n");
                status = -ENODEV;