lkml.org 
[lkml]   [2009]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/8] PCI PCIe portdrv: Remove unused device extension
    Date
    From: Rafael J. Wysocki <rjw@sisk.pl>

    There is struct pcie_port_device_ext defined in portdrv.h, but its
    member is only initialized and never used. Remove it.

    Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
    ---
    drivers/pci/pcie/portdrv.h | 4 ----
    drivers/pci/pcie/portdrv_core.c | 8 --------
    2 files changed, 12 deletions(-)

    Index: linux-2.6/drivers/pci/pcie/portdrv.h
    ===================================================================
    --- linux-2.6.orig/drivers/pci/pcie/portdrv.h
    +++ linux-2.6/drivers/pci/pcie/portdrv.h
    @@ -28,10 +28,6 @@

    #define get_descriptor_id(type, service) (((type - 4) << 4) | service)

    -struct pcie_port_device_ext {
    - int interrupt_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */
    -};
    -
    extern struct bus_type pcie_port_bus_type;
    extern int pcie_port_device_probe(struct pci_dev *dev);
    extern int pcie_port_device_register(struct pci_dev *dev);
    Index: linux-2.6/drivers/pci/pcie/portdrv_core.c
    ===================================================================
    --- linux-2.6.orig/drivers/pci/pcie/portdrv_core.c
    +++ linux-2.6/drivers/pci/pcie/portdrv_core.c
    @@ -204,17 +204,10 @@ int pcie_port_device_probe(struct pci_de
    */
    int pcie_port_device_register(struct pci_dev *dev)
    {
    - struct pcie_port_device_ext *p_ext;
    int status, type, capabilities, irq_mode, i;
    int vectors[PCIE_PORT_DEVICE_MAXSERVICES];
    u16 reg16;

    - /* Allocate port device extension */
    - if (!(p_ext = kmalloc(sizeof(struct pcie_port_device_ext), GFP_KERNEL)))
    - return -ENOMEM;
    -
    - pci_set_drvdata(dev, p_ext);
    -
    /* Get port type */
    pci_read_config_word(dev,
    pci_find_capability(dev, PCI_CAP_ID_EXP) +
    @@ -224,7 +217,6 @@ int pcie_port_device_register(struct pci
    /* Now get port services */
    capabilities = get_port_device_capability(dev);
    irq_mode = assign_interrupt_mode(dev, vectors, capabilities);
    - p_ext->interrupt_mode = irq_mode;

    /* Allocate child services if any */
    for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) {


    \
     
     \ /
      Last update: 2009-01-05 00:03    [W:0.025 / U:0.012 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site