2018-04-10 13:28:58

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH v1 0/2] microblaze/PCI: Remove unused code

Remove some unused microblaze PCI code.

I can merge these via PCI if you like, Michal. I have some related
changes coming for some sparc resource claim issues. Or it's fine if
you pick them up.

---

Bjorn Helgaas (2):
microblaze/PCI: Remove pcibios_finish_adding_to_bus() dead code
microblaze/PCI: Remove pcibios_claim_one_bus() dead code


arch/microblaze/include/asm/pci.h | 4 --
arch/microblaze/pci/pci-common.c | 61 -------------------------------------
2 files changed, 65 deletions(-)


2018-04-10 13:29:16

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH v1 2/2] microblaze/PCI: Remove pcibios_claim_one_bus() dead code

From: Bjorn Helgaas <[email protected]>

pcibios_claim_one_bus() is defined but never used. Remove it.

Signed-off-by: Bjorn Helgaas <[email protected]>
---
arch/microblaze/include/asm/pci.h | 2 --
arch/microblaze/pci/pci-common.c | 37 -------------------------------------
2 files changed, 39 deletions(-)

diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h
index 4a96480e7716..7cfb90010f16 100644
--- a/arch/microblaze/include/asm/pci.h
+++ b/arch/microblaze/include/asm/pci.h
@@ -67,8 +67,6 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
*/
#define PCI_DMA_BUS_IS_PHYS (1)

-extern void pcibios_claim_one_bus(struct pci_bus *b);
-
extern void pcibios_resource_survey(void);

struct file;
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 61494c4379f9..6a4e5b32a90e 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -996,43 +996,6 @@ void __init pcibios_resource_survey(void)
pci_assign_unassigned_resources();
}

-/* This is used by the PCI hotplug driver to allocate resource
- * of newly plugged busses. We can try to consolidate with the
- * rest of the code later, for now, keep it as-is as our main
- * resource allocation function doesn't deal with sub-trees yet.
- */
-void pcibios_claim_one_bus(struct pci_bus *bus)
-{
- struct pci_dev *dev;
- struct pci_bus *child_bus;
-
- list_for_each_entry(dev, &bus->devices, bus_list) {
- int i;
-
- for (i = 0; i < PCI_NUM_RESOURCES; i++) {
- struct resource *r = &dev->resource[i];
-
- if (r->parent || !r->start || !r->flags)
- continue;
-
- pr_debug("PCI: Claiming %s: ", pci_name(dev));
- pr_debug("Resource %d: %016llx..%016llx [%x]\n",
- i, (unsigned long long)r->start,
- (unsigned long long)r->end,
- (unsigned int)r->flags);
-
- if (pci_claim_resource(dev, i) == 0)
- continue;
-
- pci_claim_bridge_resource(dev, i);
- }
- }
-
- list_for_each_entry(child_bus, &bus->children, node)
- pcibios_claim_one_bus(child_bus);
-}
-EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
-
static void pcibios_setup_phb_resources(struct pci_controller *hose,
struct list_head *resources)
{


2018-04-10 13:30:01

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH v1 1/2] microblaze/PCI: Remove pcibios_finish_adding_to_bus() dead code

From: Bjorn Helgaas <[email protected]>

pcibios_finish_adding_to_bus() is defined but never used. Remove it.

Signed-off-by: Bjorn Helgaas <[email protected]>
---
arch/microblaze/include/asm/pci.h | 2 --
arch/microblaze/pci/pci-common.c | 24 ------------------------
2 files changed, 26 deletions(-)

diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h
index 114b93488193..4a96480e7716 100644
--- a/arch/microblaze/include/asm/pci.h
+++ b/arch/microblaze/include/asm/pci.h
@@ -69,8 +69,6 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,

extern void pcibios_claim_one_bus(struct pci_bus *b);

-extern void pcibios_finish_adding_to_bus(struct pci_bus *bus);
-
extern void pcibios_resource_survey(void);

struct file;
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index ae79e8638d50..61494c4379f9 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -1033,30 +1033,6 @@ void pcibios_claim_one_bus(struct pci_bus *bus)
}
EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);

-
-/* pcibios_finish_adding_to_bus
- *
- * This is to be called by the hotplug code after devices have been
- * added to a bus, this include calling it for a PHB that is just
- * being added
- */
-void pcibios_finish_adding_to_bus(struct pci_bus *bus)
-{
- pr_debug("PCI: Finishing adding to hotplug bus %04x:%02x\n",
- pci_domain_nr(bus), bus->number);
-
- /* Allocate bus and devices resources */
- pcibios_allocate_bus_resources(bus);
- pcibios_claim_one_bus(bus);
-
- /* Add new devices to global lists. Register in proc, sysfs. */
- pci_bus_add_devices(bus);
-
- /* Fixup EEH */
- /* eeh_add_device_tree_late(bus); */
-}
-EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus);
-
static void pcibios_setup_phb_resources(struct pci_controller *hose,
struct list_head *resources)
{


2018-04-20 18:59:29

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] microblaze/PCI: Remove unused code

On Tue, Apr 10, 2018 at 08:24:59AM -0500, Bjorn Helgaas wrote:
> Remove some unused microblaze PCI code.
>
> I can merge these via PCI if you like, Michal. I have some related
> changes coming for some sparc resource claim issues. Or it's fine if
> you pick them up.

I applied these to pci/microblaze for v4.17. If you pick them up,
Michal, I'll drop them; just let me know.

> ---
>
> Bjorn Helgaas (2):
> microblaze/PCI: Remove pcibios_finish_adding_to_bus() dead code
> microblaze/PCI: Remove pcibios_claim_one_bus() dead code
>
>
> arch/microblaze/include/asm/pci.h | 4 --
> arch/microblaze/pci/pci-common.c | 61 -------------------------------------
> 2 files changed, 65 deletions(-)

2018-04-26 10:38:12

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] microblaze/PCI: Remove unused code

Hi Bjorn,

On 20.4.2018 20:56, Bjorn Helgaas wrote:
> On Tue, Apr 10, 2018 at 08:24:59AM -0500, Bjorn Helgaas wrote:
>> Remove some unused microblaze PCI code.
>>
>> I can merge these via PCI if you like, Michal. I have some related
>> changes coming for some sparc resource claim issues. Or it's fine if
>> you pick them up.
>
> I applied these to pci/microblaze for v4.17. If you pick them up,
> Michal, I'll drop them; just let me know.

Not a problem with it.

Thanks,
Michal


--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: http://www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs



Attachments:
signature.asc (205.00 B)
OpenPGP digital signature