Skip to content

Commit 689e6b5

Browse files
committed
PCI/MSI: Correct misleading comments
The comments about preserving the cached state in pci_msi[x]_shutdown() are misleading as the MSI descriptors are freed right after those functions return. So there is nothing to restore. Preparatory change. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Marc Zyngier <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 361fd37 commit 689e6b5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/pci/msi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,6 @@ static void pci_msi_shutdown(struct pci_dev *dev)
961961

962962
/* Return the device with MSI unmasked as initial states */
963963
mask = msi_mask(desc->msi_attrib.multi_cap);
964-
/* Keep cached state to be restored */
965964
__pci_msi_desc_mask_irq(desc, mask, 0);
966965

967966
/* Restore dev->irq to its default pin-assertion IRQ */
@@ -1047,10 +1046,8 @@ static void pci_msix_shutdown(struct pci_dev *dev)
10471046
}
10481047

10491048
/* Return the device with MSI-X masked as initial states */
1050-
for_each_pci_msi_entry(entry, dev) {
1051-
/* Keep cached states to be restored */
1049+
for_each_pci_msi_entry(entry, dev)
10521050
__pci_msix_desc_mask_irq(entry, 1);
1053-
}
10541051

10551052
pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0);
10561053
pci_intx_for_msi(dev, 1);

0 commit comments

Comments
 (0)