diff mbox

[v2,3/7] pci: Remove unused function ich9_d2pbr_init()

Message ID 1426313974-25607-4-git-send-email-thuth@linux.vnet.ibm.com
State New
Headers show

Commit Message

Thomas Huth March 14, 2015, 6:19 a.m. UTC
The function ich9_d2pbr_init() is completely unused and
thus can be deleted.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
---
 hw/pci-bridge/i82801b11.c |   21 ---------------------
 include/hw/i386/ich9.h    |    1 -
 2 files changed, 0 insertions(+), 22 deletions(-)

Comments

Michael S. Tsirkin March 18, 2015, 1:20 p.m. UTC | #1
On Sat, Mar 14, 2015 at 07:19:30AM +0100, Thomas Huth wrote:
> The function ich9_d2pbr_init() is completely unused and
> thus can be deleted.
> 
> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

I assume all this will go in for 2.4 through the trivial tree?

> ---
>  hw/pci-bridge/i82801b11.c |   21 ---------------------
>  include/hw/i386/ich9.h    |    1 -
>  2 files changed, 0 insertions(+), 22 deletions(-)
> 
> diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c
> index 14cd7fd..7e79bc0 100644
> --- a/hw/pci-bridge/i82801b11.c
> +++ b/hw/pci-bridge/i82801b11.c
> @@ -101,27 +101,6 @@ static const TypeInfo i82801b11_bridge_info = {
>      .class_init    = i82801b11_bridge_class_init,
>  };
>  
> -PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus)
> -{
> -    PCIDevice *d;
> -    PCIBridge *br;
> -    char buf[16];
> -    DeviceState *qdev;
> -
> -    d = pci_create_multifunction(bus, devfn, true, "i82801b11-bridge");
> -    if (!d) {
> -        return NULL;
> -    }
> -    br = PCI_BRIDGE(d);
> -    qdev = DEVICE(d);
> -
> -    snprintf(buf, sizeof(buf), "pci.%d", sec_bus);
> -    pci_bridge_map_irq(br, buf, pci_swizzle_map_irq_fn);
> -    qdev_init_nofail(qdev);
> -
> -    return pci_bridge_get_sec_bus(br);
> -}
> -
>  static void d2pbr_register(void)
>  {
>      type_register_static(&i82801b11_bridge_info);
> diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h
> index 59ea25b..5cede9b 100644
> --- a/include/hw/i386/ich9.h
> +++ b/include/hw/i386/ich9.h
> @@ -19,7 +19,6 @@ void ich9_lpc_set_irq(void *opaque, int irq_num, int level);
>  int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx);
>  PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin);
>  void ich9_lpc_pm_init(PCIDevice *pci_lpc);
> -PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus);
>  I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base);
>  
>  #define ICH9_CC_SIZE                            (16 * 1024)     /* 16KB */
> -- 
> 1.7.1
>
Thomas Huth March 20, 2015, 7:40 a.m. UTC | #2
On Wed, 18 Mar 2015 14:20:41 +0100
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Sat, Mar 14, 2015 at 07:19:30AM +0100, Thomas Huth wrote:
> > The function ich9_d2pbr_init() is completely unused and
> > thus can be deleted.
> > 
> > Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
> > Cc: Michael S. Tsirkin <mst@redhat.com>
> 
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> 
> I assume all this will go in for 2.4 through the trivial tree?

The patch that removes unused functions from the migration code has
already been picked up in the migration tree ... so I also don't mind
whether you want to take this through the pci tree or not. Just if
the patches are not picked up through other trees, they should finally
go through trivial, I think.

 Thomas
diff mbox

Patch

diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c
index 14cd7fd..7e79bc0 100644
--- a/hw/pci-bridge/i82801b11.c
+++ b/hw/pci-bridge/i82801b11.c
@@ -101,27 +101,6 @@  static const TypeInfo i82801b11_bridge_info = {
     .class_init    = i82801b11_bridge_class_init,
 };
 
-PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus)
-{
-    PCIDevice *d;
-    PCIBridge *br;
-    char buf[16];
-    DeviceState *qdev;
-
-    d = pci_create_multifunction(bus, devfn, true, "i82801b11-bridge");
-    if (!d) {
-        return NULL;
-    }
-    br = PCI_BRIDGE(d);
-    qdev = DEVICE(d);
-
-    snprintf(buf, sizeof(buf), "pci.%d", sec_bus);
-    pci_bridge_map_irq(br, buf, pci_swizzle_map_irq_fn);
-    qdev_init_nofail(qdev);
-
-    return pci_bridge_get_sec_bus(br);
-}
-
 static void d2pbr_register(void)
 {
     type_register_static(&i82801b11_bridge_info);
diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h
index 59ea25b..5cede9b 100644
--- a/include/hw/i386/ich9.h
+++ b/include/hw/i386/ich9.h
@@ -19,7 +19,6 @@  void ich9_lpc_set_irq(void *opaque, int irq_num, int level);
 int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx);
 PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin);
 void ich9_lpc_pm_init(PCIDevice *pci_lpc);
-PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus);
 I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base);
 
 #define ICH9_CC_SIZE                            (16 * 1024)     /* 16KB */