[PATCH V2 0/4] mailbox: zynqmp-ipi: Improve resource cleanup on driver unbind

Harini T posted 4 patches 2 days, 13 hours ago
drivers/mailbox/zynqmp-ipi-mailbox.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
[PATCH V2 0/4] mailbox: zynqmp-ipi: Improve resource cleanup on driver unbind
Posted by Harini T 2 days, 13 hours ago
1. Remove redundant mbox_controller_unregister() call, as
device_unregister() already handles controller cleanup.
2. Remove ipi_mbox->dev.parent check in zynqmp_ipi_free_mboxes() as
device_is_registered() is the canonical and robust method to verify the
device registration status.
3. Fix the mailbox cleanup loop to prevent out-of-bounds array access.
4. Fix SGI resource cleanup by using an explicit irq_type field for
reliable SGI detection, replacing the unreliable IRQ number check.

---
Changes in V2:
- Address review comments from V1.
- Patch 1/3 from V1 has been split into two patches in which the first
  focuses on removing the redundant mbox_controller_unregister() call
  and the second focuses on removing ipi_mbox->dev.parent check.
- Avoid using i-- as the 1st param in for loop.
- Avoid using variable name in the commit message for patch 3/4.
- Add Fixes tag for all the patches in the series.

V1 link: https://lore.kernel.org/all/20250822045732.1068103-1-harini.t@amd.com/
---

Harini T (4):
  mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister()
    call
  mailbox: zynqmp-ipi: Remove dev.parent check in zynqmp_ipi_free_mboxes
  mailbox: zynqmp-ipi: Fix out-of-bounds access in mailbox cleanup loop
  mailbox: zynqmp-ipi: Fix SGI cleanup on unbind

 drivers/mailbox/zynqmp-ipi-mailbox.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

-- 
2.43.0