]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: dwc: Code cleanup
authorRadu Rendec <rrendec@redhat.com>
Fri, 28 Nov 2025 21:20:54 +0000 (16:20 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 15 Dec 2025 21:30:48 +0000 (22:30 +0100)
commitf1875091a01dd634ff5f8b6fc57ab874f755c415
treec67230c124d2cbee252a3d4933fc2086632195e4
parentfcc1d0dabdb65ca069f77e5b76d3b20277be4a15
PCI: dwc: Code cleanup

Code cleanup with no functional changes. These changes were originally
made by Thomas Gleixner (see Link tag below) in a patch that was never
submitted as is. Other parts of that patch were eventually submitted as
commit 8e717112caf3 ("PCI: dwc: Switch to msi_create_parent_irq_domain()")
and the remaining parts are the code cleanup changes:

    - Use guard()/scoped_guard() instead of open-coded lock/unlock.
    - Return void in a few functions whose return value is never used.
    - Simplify dw_handle_msi_irq() by using for_each_set_bit().

One notable deviation from the original patch is that it reverts back to a
simple 1 by 1 iteration over the controllers inside dw_handle_msi_irq.  The
reason is that with the original changes, the IRQ offset was calculated
incorrectly.

This prepares the ground for enabling MSI affinity support, which was
originally part of that same series that Thomas Gleixner prepared.

Originally-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Radu Rendec <rrendec@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/linux-pci/878qpg4o4t.ffs@tglx/
Link: https://patch.msgid.link/20251128212055.1409093-3-rrendec@redhat.com
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/dwc/pcie-designware.h