[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQW9fMVmT8Bd6BFHS=7xc34PUwWGKdU_gYen_Zjy6KS6yw@mail.gmail.com>
Date: Tue, 18 Aug 2015 13:58:05 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: David Miller <davem@...emloft.net>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Wei Yang <weiyang@...ux.vnet.ibm.com>, TJ <linux@....tj>,
Yijing Wang <wangyijing@...wei.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 07/51] PCI: Reorder resources list for must/optional resources
On Mon, Aug 17, 2015 at 4:52 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
> On Mon, Jul 27, 2015 at 04:29:25PM -0700, Yinghai Lu wrote:
>> After we update size and alignment for must+optional resource, we
>> reorder them with new alignment, but this is only for STARTALIGN.
>>
>> For SIZEALIGN type resource, after add back add_size, the alignment
>> get changed, so need to do the sorting like STARTALIGN type resources.
>>
>> Also we need to reorder the sorting back after we restore
>> resource to must only when must+optional fail to allocate for all.
>>
>> So move out the reordering code from the loop to separated function,
>> and call it two times accordingly.
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>> ---
>> drivers/pci/setup-bus.c | 62 +++++++++++++++++++++++++++++--------------------
>> 1 file changed, 37 insertions(+), 25 deletions(-)
>>
>> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
>> index 7346bbf..6f2d508 100644
>> --- a/drivers/pci/setup-bus.c
>> +++ b/drivers/pci/setup-bus.c
>> @@ -287,6 +287,31 @@ static inline void reset_resource(struct resource *res)
>> res->flags = 0;
>> }
>>
>> +static void __sort_resources(struct list_head *head)
>
> Why did you add "__" before the function name?
ok, will remove that.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists