Skip to content

Commit

Permalink
EDAC: Remove NO_IRQ from powerpc-only drivers
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Johannes Thumshirn <[email protected]>
Cc: linux-edac <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Borislav Petkov <[email protected]>
  • Loading branch information
mpe authored and suryasaimadhu committed Sep 12, 2016
1 parent 43fa9ba commit 3720957
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions drivers/edac/mpc85xx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions drivers/edac/mv64x60_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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++;

Expand Down
4 changes: 1 addition & 3 deletions drivers/edac/ppc4xx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3720957

Please sign in to comment.