Skip to contentSkip to conversation

PCI: Trivial comment fixup for PCI mmap ifdefs

PATCH Applied Clint Sbisa 2 participants 2 messages Aug 21, 2020 – Sep 17, 2020 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Trivial comment fixup for PCI mmap ifdefs

The else/endif comments for pci_{create,remove}_resource_files were not updated in commit f719582435afe9c7985206e42d804ea6aa315d33 ("PCI:
Add pci_mmap_resource_range() and use it for ARM64").

---
 drivers/pci/pci-sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci-sysfs.c +2 -2
index 6d78df981d41..cfc67b208616 100644
@@ -1196,10 +1196,10 @@ static int pci_create_resource_files(struct pci_dev *pdev)
 	}
 	return 0;
 }
-#else /* !HAVE_PCI_MMAP */
+#else /* ! (defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE)) */
 int __weak pci_create_resource_files(struct pci_dev *dev) { return 0; }
 void __weak pci_remove_resource_files(struct pci_dev *dev) { return; }
-#endif /* HAVE_PCI_MMAP */
+#endif /* defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE) */
 
 /**
  * pci_write_rom - used to enable access to the PCI ROM display
Signature · 1 line
2.23.3
#1 lore raw
Quoted 5 lines · Clint Sbisa

The else/endif comments for pci_{create,remove}_resource_files were not updated in commit f719582435afe9c7985206e42d804ea6aa315d33 ("PCI:
Add pci_mmap_resource_range() and use it for ARM64").

Applied to pci/misc for v5.10, thanks!

Quoted 24 lines
---
 drivers/pci/pci-sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci-sysfs.c +2 -2
index 6d78df981d41..cfc67b208616 100644
@@ -1196,10 +1196,10 @@ static int pci_create_resource_files(struct pci_dev *pdev)
 	}
 	return 0;
 }
-#else /* !HAVE_PCI_MMAP */
+#else /* ! (defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE)) */
 int __weak pci_create_resource_files(struct pci_dev *dev) { return 0; }
 void __weak pci_remove_resource_files(struct pci_dev *dev) { return; }
-#endif /* HAVE_PCI_MMAP */
+#endif /* defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE) */
 
 /**
  * pci_write_rom - used to enable access to the PCI ROM display
Signature · 1 line
2.23.3