* [PATCH 1/3] PCI: remove pci_bus_find_ext_capability() (unused)
@ 2012-05-08 23:46 Bjorn Helgaas
2012-05-08 23:46 ` [PATCH 2/3] PCI: remove pci_max_busnr() (was already commented out) Bjorn Helgaas
2012-05-08 23:46 ` [PATCH 3/3] PCI/AER: use pci_is_pcie() instead of obsolete pci_dev.is_pcie Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2012-05-08 23:46 UTC (permalink / raw)
To: linux-pci
pci_bus_find_ext_capability() is unused, and this patch removes it.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/pci.c | 43 -------------------------------------------
include/linux/pci.h | 2 --
2 files changed, 0 insertions(+), 45 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 111569c..69c21f0 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -328,49 +328,6 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap)
}
EXPORT_SYMBOL_GPL(pci_find_ext_capability);
-/**
- * pci_bus_find_ext_capability - find an extended capability
- * @bus: the PCI bus to query
- * @devfn: PCI device to query
- * @cap: capability code
- *
- * Like pci_find_ext_capability() but works for pci devices that do not have a
- * pci_dev structure set up yet.
- *
- * Returns the address of the requested capability structure within the
- * device's PCI configuration space or 0 in case the device does not
- * support it.
- */
-int pci_bus_find_ext_capability(struct pci_bus *bus, unsigned int devfn,
- int cap)
-{
- u32 header;
- int ttl;
- int pos = PCI_CFG_SPACE_SIZE;
-
- /* minimum 8 bytes per capability */
- ttl = (PCI_CFG_SPACE_EXP_SIZE - PCI_CFG_SPACE_SIZE) / 8;
-
- if (!pci_bus_read_config_dword(bus, devfn, pos, &header))
- return 0;
- if (header == 0xffffffff || header == 0)
- return 0;
-
- while (ttl-- > 0) {
- if (PCI_EXT_CAP_ID(header) == cap)
- return pos;
-
- pos = PCI_EXT_CAP_NEXT(header);
- if (pos < PCI_CFG_SPACE_SIZE)
- break;
-
- if (!pci_bus_read_config_dword(bus, devfn, pos, &header))
- break;
- }
-
- return 0;
-}
-
static int __pci_find_next_ht_cap(struct pci_dev *dev, int pos, int ht_cap)
{
int rc, ttl = PCI_FIND_CAP_TTL;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index e444f5b..0e0c489 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -707,8 +707,6 @@ enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev);
int pci_find_capability(struct pci_dev *dev, int cap);
int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
int pci_find_ext_capability(struct pci_dev *dev, int cap);
-int pci_bus_find_ext_capability(struct pci_bus *bus, unsigned int devfn,
- int cap);
int pci_find_ht_capability(struct pci_dev *dev, int ht_cap);
int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap);
struct pci_bus *pci_find_next_bus(const struct pci_bus *from);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] PCI: remove pci_max_busnr() (was already commented out)
2012-05-08 23:46 [PATCH 1/3] PCI: remove pci_bus_find_ext_capability() (unused) Bjorn Helgaas
@ 2012-05-08 23:46 ` Bjorn Helgaas
2012-05-08 23:46 ` [PATCH 3/3] PCI/AER: use pci_is_pcie() instead of obsolete pci_dev.is_pcie Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2012-05-08 23:46 UTC (permalink / raw)
To: linux-pci
pci_max_busnr() has been commented out for years (since 54c762fe62), and
this patch removes it completely.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/pci.c | 24 ------------------------
1 files changed, 0 insertions(+), 24 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 69c21f0..09cd709 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -135,30 +135,6 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
EXPORT_SYMBOL_GPL(pci_ioremap_bar);
#endif
-#if 0
-/**
- * pci_max_busnr - returns maximum PCI bus number
- *
- * Returns the highest PCI bus number present in the system global list of
- * PCI buses.
- */
-unsigned char __devinit
-pci_max_busnr(void)
-{
- struct pci_bus *bus = NULL;
- unsigned char max, n;
-
- max = 0;
- while ((bus = pci_find_next_bus(bus)) != NULL) {
- n = pci_bus_max_busnr(bus);
- if(n > max)
- max = n;
- }
- return max;
-}
-
-#endif /* 0 */
-
#define PCI_FIND_CAP_TTL 48
static int __pci_find_next_cap_ttl(struct pci_bus *bus, unsigned int devfn,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] PCI/AER: use pci_is_pcie() instead of obsolete pci_dev.is_pcie
2012-05-08 23:46 [PATCH 1/3] PCI: remove pci_bus_find_ext_capability() (unused) Bjorn Helgaas
2012-05-08 23:46 ` [PATCH 2/3] PCI: remove pci_max_busnr() (was already commented out) Bjorn Helgaas
@ 2012-05-08 23:46 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2012-05-08 23:46 UTC (permalink / raw)
To: linux-pci; +Cc: Kenji Kaneshige, Huang Ying
Use pci_is_pcie() instead of looking at obsolete is_pcie field in
struct pci_dev.
CC: Huang Ying <ying.huang@intel.com>
CC: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/pcie/aer/aerdrv_acpi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c
index 275bf15..124f20f 100644
--- a/drivers/pci/pcie/aer/aerdrv_acpi.c
+++ b/drivers/pci/pcie/aer/aerdrv_acpi.c
@@ -59,7 +59,7 @@ static int aer_hest_parse(struct acpi_hest_header *hest_hdr, void *data)
p = (struct acpi_hest_aer_common *)(hest_hdr + 1);
if (p->flags & ACPI_HEST_GLOBAL) {
- if ((info->pci_dev->is_pcie &&
+ if ((pci_is_pcie(info->pci_dev) &&
info->pci_dev->pcie_type == pcie_type) || bridge)
ff = !!(p->flags & ACPI_HEST_FIRMWARE_FIRST);
} else
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-08 23:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-08 23:46 [PATCH 1/3] PCI: remove pci_bus_find_ext_capability() (unused) Bjorn Helgaas
2012-05-08 23:46 ` [PATCH 2/3] PCI: remove pci_max_busnr() (was already commented out) Bjorn Helgaas
2012-05-08 23:46 ` [PATCH 3/3] PCI/AER: use pci_is_pcie() instead of obsolete pci_dev.is_pcie Bjorn Helgaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.