linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] PCI trivial cleanups
@ 2013-01-09 17:52 Bjorn Helgaas
  2013-01-09 17:52 ` [PATCH 1/5] x86/PCI: Remove unused pci_root_bus Bjorn Helgaas
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 17:52 UTC (permalink / raw)
  To: linux-pci; +Cc: David Howells, Koichi Yasutake, x86

These are trivial cleanups headed for v3.9.

---

Bjorn Helgaas (5):
      x86/PCI: Remove unused pci_root_bus
      frv/PCI: Remove unused pci_root_bus
      mn10300/PCI: Remove unused pci_root_bus
      PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
      PCI: Drop "__" prefix on __pci_enable_device_flags()


 arch/frv/mb93090-mb00/pci-frv.h         |    1 -
 arch/frv/mb93090-mb00/pci-vdk.c         |    4 +---
 arch/mn10300/unit-asb2305/pci-asb2305.h |    1 -
 arch/mn10300/unit-asb2305/pci.c         |    4 +---
 arch/x86/include/asm/pci_x86.h          |    1 -
 arch/x86/pci/common.c                   |    1 -
 arch/x86/pci/legacy.c                   |    2 +-
 arch/x86/pci/numaq_32.c                 |    2 +-
 drivers/pci/pci.c                       |    9 ++++-----
 9 files changed, 8 insertions(+), 17 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] x86/PCI: Remove unused pci_root_bus
  2013-01-09 17:52 [PATCH 0/5] PCI trivial cleanups Bjorn Helgaas
@ 2013-01-09 17:52 ` Bjorn Helgaas
  2013-01-09 17:53 ` [PATCH 2/5] frv/PCI: " Bjorn Helgaas
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 17:52 UTC (permalink / raw)
  To: linux-pci; +Cc: David Howells, Koichi Yasutake, x86

pci_root_bus is unused, so remove all references to it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/x86/include/asm/pci_x86.h |    1 -
 arch/x86/pci/common.c          |    1 -
 arch/x86/pci/legacy.c          |    2 +-
 arch/x86/pci/numaq_32.c        |    2 +-
 4 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index 73e8eef..0126f10 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -54,7 +54,6 @@ void pcibios_set_cache_line_size(void);
 /* pci-pc.c */
 
 extern int pcibios_last_bus;
-extern struct pci_bus *pci_root_bus;
 extern struct pci_ops pci_root_ops;
 
 void pcibios_scan_specific_bus(int busn);
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 412e128..505731b 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -34,7 +34,6 @@ int noioapicreroute = 1;
 #endif
 int pcibios_last_bus = -1;
 unsigned long pirq_table_addr;
-struct pci_bus *pci_root_bus;
 const struct pci_raw_ops *__read_mostly raw_pci_ops;
 const struct pci_raw_ops *__read_mostly raw_pci_ext_ops;
 
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index a1df191..a9e8308 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -30,7 +30,7 @@ int __init pci_legacy_init(void)
 	}
 
 	printk("PCI: Probing PCI hardware\n");
-	pci_root_bus = pcibios_scan_root(0);
+	pcibios_scan_root(0);
 	return 0;
 }
 
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c
index 83e125b..00edfe6 100644
--- a/arch/x86/pci/numaq_32.c
+++ b/arch/x86/pci/numaq_32.c
@@ -152,7 +152,7 @@ int __init pci_numaq_init(void)
 
 	raw_pci_ops = &pci_direct_conf1_mq;
 
-	pci_root_bus = pcibios_scan_root(0);
+	pcibios_scan_root(0);
 	if (num_online_nodes() > 1)
 		for_each_online_node(quad) {
 			if (quad == 0)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] frv/PCI: Remove unused pci_root_bus
  2013-01-09 17:52 [PATCH 0/5] PCI trivial cleanups Bjorn Helgaas
  2013-01-09 17:52 ` [PATCH 1/5] x86/PCI: Remove unused pci_root_bus Bjorn Helgaas
@ 2013-01-09 17:53 ` Bjorn Helgaas
  2013-01-09 17:53 ` [PATCH 3/5] mn10300/PCI: " Bjorn Helgaas
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 17:53 UTC (permalink / raw)
  To: linux-pci; +Cc: David Howells, Koichi Yasutake, x86

pci_root_bus is unused, so remove all references to it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/frv/mb93090-mb00/pci-frv.h |    1 -
 arch/frv/mb93090-mb00/pci-vdk.c |    4 +---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/frv/mb93090-mb00/pci-frv.h b/arch/frv/mb93090-mb00/pci-frv.h
index 089eeba..76c4e73 100644
--- a/arch/frv/mb93090-mb00/pci-frv.h
+++ b/arch/frv/mb93090-mb00/pci-frv.h
@@ -31,7 +31,6 @@ void pcibios_resource_survey(void);
 /* pci-vdk.c */
 
 extern int __nongpreldata pcibios_last_bus;
-extern struct pci_bus *__nongpreldata pci_root_bus;
 extern struct pci_ops *__nongpreldata pci_root_ops;
 
 /* pci-irq.c */
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
index 71e9bcf..1152a1e 100644
--- a/arch/frv/mb93090-mb00/pci-vdk.c
+++ b/arch/frv/mb93090-mb00/pci-vdk.c
@@ -26,7 +26,6 @@
 unsigned int __nongpreldata pci_probe = 1;
 
 int  __nongpreldata pcibios_last_bus = -1;
-struct pci_bus *__nongpreldata pci_root_bus;
 struct pci_ops *__nongpreldata pci_root_ops;
 
 /*
@@ -416,8 +415,7 @@ int __init pcibios_init(void)
 	printk("PCI: Probing PCI hardware\n");
 	pci_add_resource(&resources, &pci_ioport_resource);
 	pci_add_resource(&resources, &pci_iomem_resource);
-	pci_root_bus = pci_scan_root_bus(NULL, 0, pci_root_ops, NULL,
-					 &resources);
+	pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources);
 
 	pcibios_irq_init();
 	pcibios_fixup_peer_bridges();


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] mn10300/PCI: Remove unused pci_root_bus
  2013-01-09 17:52 [PATCH 0/5] PCI trivial cleanups Bjorn Helgaas
  2013-01-09 17:52 ` [PATCH 1/5] x86/PCI: Remove unused pci_root_bus Bjorn Helgaas
  2013-01-09 17:53 ` [PATCH 2/5] frv/PCI: " Bjorn Helgaas
@ 2013-01-09 17:53 ` Bjorn Helgaas
  2013-01-09 17:53 ` [PATCH 4/5] PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h Bjorn Helgaas
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 17:53 UTC (permalink / raw)
  To: linux-pci; +Cc: David Howells, Koichi Yasutake, x86

pci_root_bus is unused, so remove all references to it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/mn10300/unit-asb2305/pci-asb2305.h |    1 -
 arch/mn10300/unit-asb2305/pci.c         |    4 +---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.h b/arch/mn10300/unit-asb2305/pci-asb2305.h
index 1194fe4..7fa66a0 100644
--- a/arch/mn10300/unit-asb2305/pci-asb2305.h
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.h
@@ -36,7 +36,6 @@ extern void pcibios_resource_survey(void);
 /* pci.c */
 
 extern int pcibios_last_bus;
-extern struct pci_bus *pci_root_bus;
 extern struct pci_ops *pci_root_ops;
 
 extern struct irq_routing_table *pcibios_get_irq_routing_table(void);
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c
index e205948..426bf51 100644
--- a/arch/mn10300/unit-asb2305/pci.c
+++ b/arch/mn10300/unit-asb2305/pci.c
@@ -24,7 +24,6 @@
 unsigned int pci_probe = 1;
 
 int pcibios_last_bus = -1;
-struct pci_bus *pci_root_bus;
 struct pci_ops *pci_root_ops;
 
 /*
@@ -377,8 +376,7 @@ static int __init pcibios_init(void)
 
 	pci_add_resource_offset(&resources, &pci_ioport_resource, io_offset);
 	pci_add_resource_offset(&resources, &pci_iomem_resource, mem_offset);
-	pci_root_bus = pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL,
-					 &resources);
+	pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL, &resources);
 
 	pcibios_irq_init();
 	pcibios_fixup_irqs();


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
  2013-01-09 17:52 [PATCH 0/5] PCI trivial cleanups Bjorn Helgaas
                   ` (2 preceding siblings ...)
  2013-01-09 17:53 ` [PATCH 3/5] mn10300/PCI: " Bjorn Helgaas
@ 2013-01-09 17:53 ` Bjorn Helgaas
  2013-01-09 17:53 ` [PATCH 5/5] PCI: Drop "__" prefix on __pci_enable_device_flags() Bjorn Helgaas
  2013-01-11 10:47 ` [PATCH 0/5] PCI trivial cleanups David Howells
  5 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 17:53 UTC (permalink / raw)
  To: linux-pci; +Cc: David Howells, Koichi Yasutake, x86

__pci_enable_device_flags() takes values like IORESOURCE_IO and
IORESOURCE_MEM, which are values for struct resource.flags, which is
"unsigned long", not "resource_size_t".

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 5cb5820..d574fbd 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1157,7 +1157,7 @@ int pci_reenable_device(struct pci_dev *dev)
 }
 
 static int __pci_enable_device_flags(struct pci_dev *dev,
-				     resource_size_t flags)
+				     unsigned long flags)
 {
 	int err;
 	int i, bars = 0;


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] PCI: Drop "__" prefix on __pci_enable_device_flags()
  2013-01-09 17:52 [PATCH 0/5] PCI trivial cleanups Bjorn Helgaas
                   ` (3 preceding siblings ...)
  2013-01-09 17:53 ` [PATCH 4/5] PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h Bjorn Helgaas
@ 2013-01-09 17:53 ` Bjorn Helgaas
  2013-01-11 10:47 ` [PATCH 0/5] PCI trivial cleanups David Howells
  5 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2013-01-09 17:53 UTC (permalink / raw)
  To: linux-pci; +Cc: David Howells, Koichi Yasutake, x86

Drop the useless "__" prefix on __pci_enable_device_flags().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/pci.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d574fbd..a2f30394 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1156,8 +1156,7 @@ int pci_reenable_device(struct pci_dev *dev)
 	return 0;
 }
 
-static int __pci_enable_device_flags(struct pci_dev *dev,
-				     unsigned long flags)
+static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)
 {
 	int err;
 	int i, bars = 0;
@@ -1201,7 +1200,7 @@ static int __pci_enable_device_flags(struct pci_dev *dev,
  */
 int pci_enable_device_io(struct pci_dev *dev)
 {
-	return __pci_enable_device_flags(dev, IORESOURCE_IO);
+	return pci_enable_device_flags(dev, IORESOURCE_IO);
 }
 
 /**
@@ -1214,7 +1213,7 @@ int pci_enable_device_io(struct pci_dev *dev)
  */
 int pci_enable_device_mem(struct pci_dev *dev)
 {
-	return __pci_enable_device_flags(dev, IORESOURCE_MEM);
+	return pci_enable_device_flags(dev, IORESOURCE_MEM);
 }
 
 /**
@@ -1230,7 +1229,7 @@ int pci_enable_device_mem(struct pci_dev *dev)
  */
 int pci_enable_device(struct pci_dev *dev)
 {
-	return __pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO);
+	return pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO);
 }
 
 /*


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] PCI trivial cleanups
  2013-01-09 17:52 [PATCH 0/5] PCI trivial cleanups Bjorn Helgaas
                   ` (4 preceding siblings ...)
  2013-01-09 17:53 ` [PATCH 5/5] PCI: Drop "__" prefix on __pci_enable_device_flags() Bjorn Helgaas
@ 2013-01-11 10:47 ` David Howells
  5 siblings, 0 replies; 7+ messages in thread
From: David Howells @ 2013-01-11 10:47 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: dhowells, linux-pci, Koichi Yasutake, x86

Bjorn Helgaas <bhelgaas@google.com> wrote:

> These are trivial cleanups headed for v3.9.
> 
> ---
> 
> Bjorn Helgaas (5):
>       x86/PCI: Remove unused pci_root_bus
>       frv/PCI: Remove unused pci_root_bus
>       mn10300/PCI: Remove unused pci_root_bus
>       PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
>       PCI: Drop "__" prefix on __pci_enable_device_flags()

Feel free to add Acked-by: David Howells <dhowells@redhat.com> to all of them.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-11 10:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09 17:52 [PATCH 0/5] PCI trivial cleanups Bjorn Helgaas
2013-01-09 17:52 ` [PATCH 1/5] x86/PCI: Remove unused pci_root_bus Bjorn Helgaas
2013-01-09 17:53 ` [PATCH 2/5] frv/PCI: " Bjorn Helgaas
2013-01-09 17:53 ` [PATCH 3/5] mn10300/PCI: " Bjorn Helgaas
2013-01-09 17:53 ` [PATCH 4/5] PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h Bjorn Helgaas
2013-01-09 17:53 ` [PATCH 5/5] PCI: Drop "__" prefix on __pci_enable_device_flags() Bjorn Helgaas
2013-01-11 10:47 ` [PATCH 0/5] PCI trivial cleanups David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).