lkml.org 
[lkml]   [2012]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 03/21] PCI: Move get_res_add_size() early
    Date
    Need to call it from __assign_resources_sorted() later.

    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    ---
    drivers/pci/setup-bus.c | 29 +++++++++++++++--------------
    1 files changed, 15 insertions(+), 14 deletions(-)

    diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
    index 0282fde..75d43eb 100644
    --- a/drivers/pci/setup-bus.c
    +++ b/drivers/pci/setup-bus.c
    @@ -99,6 +99,21 @@ static void add_to_failed_list(struct resource_list_x *head,
    0 /* dont care */);
    }

    +static resource_size_t get_res_add_size(struct resource_list_x *realloc_head,
    + struct resource *res)
    +{
    + struct resource_list_x *list;
    +
    + /* check if it is in realloc_head list */
    + for (list = realloc_head->next; list && list->res != res;
    + list = list->next)
    + ;
    + if (list)
    + return list->add_size;
    +
    + return 0;
    +}
    +
    static void __dev_sort_resources(struct pci_dev *dev,
    struct resource_list *head)
    {
    @@ -550,20 +565,6 @@ static resource_size_t calculate_memsize(resource_size_t size,
    return size;
    }

    -static resource_size_t get_res_add_size(struct resource_list_x *realloc_head,
    - struct resource *res)
    -{
    - struct resource_list_x *list;
    -
    - /* check if it is in realloc_head list */
    - for (list = realloc_head->next; list && list->res != res;
    - list = list->next);
    - if (list)
    - return list->add_size;
    -
    - return 0;
    -}
    -
    /**
    * pbus_size_io() - size the io window of a given bus
    *
    --
    1.7.7


    \
     
     \ /
      Last update: 2012-01-21 11:13    [W:0.028 / U:0.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site