Skip to contentSkip to conversation

EDAC/mpc85xx: Use platform_get_irq() to get interrupt

PATCH Applied Rosen Penev 3 participants 9 messages Jun 3 – Jun 28

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC/mpc85xx: Use platform_get_irq() to get interrupt

Use platform_get_irq() to retrieve the interrupt resource instead of directly parsing and mapping the OF node via irq_of_parse_and_map(). This is the standard pattern for platform devices.

In addition, platform_get_irq() returns a negative error code on failure, which is now checked. Since we are no longer using irq_of_parse_and_map(), we do not need to call irq_dispose_mapping() on error or driver removal, so remove those calls.

Assisted-by Antigravity:Gemini-3.5-Flash
---
 drivers/edac/mpc85xx_edac.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/edac/mpc85xx_edac.c +6 -5
index 277f1c6bd522..f494d922c6a1 100644
@@ -555,14 +555,17 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
 	}
 
 	if (edac_op_state == EDAC_OPSTATE_INT) {
-		pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
+		pdata->irq = platform_get_irq(op, 0);
+		if (pdata->irq < 0) {
+			res = pdata->irq;
+			goto err;
+		}
 		res = devm_request_irq(&op->dev, pdata->irq,
 				       mpc85xx_l2_isr, IRQF_SHARED,
 				       "[EDAC] L2 err", edac_dev);
 		if (res < 0) {
 			pr_err("%s: Unable to request irq %d for MPC85xx L2 err\n",
 				__func__, pdata->irq);
-			irq_dispose_mapping(pdata->irq);
 			res = -ENODEV;
 			goto err2;
 		}
@@ -596,10 +599,8 @@ static void mpc85xx_l2_err_remove(struct platform_device *op)
 
 	edac_dbg(0, "\n");
 
-	if (edac_op_state == EDAC_OPSTATE_INT) {
+	if (edac_op_state == EDAC_OPSTATE_INT)
 		out_be32(pdata->l2_vbase + MPC85XX_L2_ERRINTEN, 0);
-		irq_dispose_mapping(pdata->irq);
-	}
 
 	out_be32(pdata->l2_vbase + MPC85XX_L2_ERRDIS, orig_l2_err_disable);
 	edac_device_del_device(&op->dev);
Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 9 lines · Rosen Penev

Use platform_get_irq() to retrieve the interrupt resource instead of directly parsing and mapping the OF node via irq_of_parse_and_map(). This is the standard pattern for platform devices.

In addition, platform_get_irq() returns a negative error code on failure, which is now checked. Since we are no longer using irq_of_parse_and_map(), we do not need to call irq_dispose_mapping() on error or driver removal, so remove those calls.

Quoted 5 lines
Assisted-by Antigravity:Gemini-3.5-Flash
---
 drivers/edac/mpc85xx_edac.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

I'd let Johannes comment here. AFAIR, he doesn't have the HW anymore and I don't know who can test this for us so...

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
maintainer
#3 lore raw
Quoted 8 lines · Johannes Thumshirn

Sorry for the late response, been on PTO for some weeks.

From what I can see this looks good, but as Boris already said, I don't have access to HW anymore so I can't test.

Anyways,

... and Sashiko has found a couple of issues too:

https://sashiko.dev/#/patchset/20260603191908.5618-1-rosenp%40gmail.com

So, how about we orphan this driver, considering that we don't have hw to test it on?

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#4 lore raw
Quoted 9 lines · Borislav Petkov
Quoted 7 lines · Johannes Thumshirn

Sorry for the late response, been on PTO for some weeks.

From what I can see this looks good, but as Boris already said, I don't have access to HW anymore so I can't test.

Anyways,

Quoted 8 lines
Quoted 1 line

... and Sashiko has found a couple of issues too:

https://sashiko.dev/#/patchset/20260603191908.5618-1-rosenp%40gmail.com

So, how about we orphan this driver, considering that we don't have hw to test it on?

sure.

Quoted 6 lines

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

#5 lore raw
In reply to Borislav Petkov
Quoted 8 lines · Borislav Petkov
Quoted 7 lines · Johannes Thumshirn

Sorry for the late response, been on PTO for some weeks.

From what I can see this looks good, but as Boris already said, I don't have
access to HW anymore so I can't test.

Anyways,

Quoted 8 lines
Quoted 1 line

... and Sashiko has found a couple of issues too:

https://sashiko.dev/#/patchset/20260603191908.5618-1-rosenp%40gmail.com

So, how about we orphan this driver, considering that we don't have hw to test it on?

Yep fine from my side

maintainer
#6 lore raw
Quoted 1 line · Johannes Thumshirn

Yep fine from my side

From: "Borislav Petkov (AMD)" <[email protected]>
Date: Fri, 12 Jun 2026 08:35:50 -0700
Subject: [PATCH] EDAC/mpc85xx: Orphan it

Johannes doesn't have the hardware to test patches on it anymore and TTBOMK, no one else has shown interest so orphan the driver, for now at least.

---
 MAINTAINERS | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -2
index dcdc7bda7ace..4f0788c8d212 100644
@@ -9298,9 +9298,8 @@ S:	Maintained
 F:	drivers/edac/igen6_edac.c
 
 EDAC-MPC85XX
-M:	Johannes Thumshirn <[email protected]>
 L:	[email protected]
-S:	Maintained
+S:	Orphan
 F:	drivers/edac/mpc85xx_edac.[ch]
 
 EDAC-NPCM
Signature · 8 lines
2.53.0


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
#7 lore raw
Quoted 11 lines · Borislav Petkov
Quoted 1 line · Johannes Thumshirn

Yep fine from my side

From: "Borislav Petkov (AMD)" <[email protected]>
Date: Fri, 12 Jun 2026 08:35:50 -0700
Subject: [PATCH] EDAC/mpc85xx: Orphan it

Johannes doesn't have the hardware to test patches on it anymore and TTBOMK, no one else has shown interest so orphan the driver, for now at least.

maintainer Applied
#8 lore raw
Quoted 7 lines · Johannes Thumshirn
Quoted 6 lines · Borislav Petkov
Quoted 1 line · Johannes Thumshirn

Yep fine from my side

From: "Borislav Petkov (AMD)" <[email protected]>
Date: Fri, 12 Jun 2026 08:35:50 -0700
Subject: [PATCH] EDAC/mpc85xx: Orphan it

Quoted 8 lines
Quoted 5 lines

Johannes doesn't have the hardware to test patches on it anymore and TTBOMK, no one else has shown interest so orphan the driver, for now at least.

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette