Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1208966 > unrolled thread

Re: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources

Started byBjorn Helgaas <bhelgaas@google.com>
First post2015-08-18 02:00 +0200
Last post2015-08-18 23:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to  pdev_check_resources Bjorn Helgaas <bhelgaas@google.com> - 2015-08-18 02:00 +0200
    Re: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources Yinghai Lu <yinghai@kernel.org> - 2015-08-18 23:40 +0200
      Re: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources Yinghai Lu <yinghai@kernel.org> - 2015-08-18 23:50 +0200

#1208966 — Re: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources

FromBjorn Helgaas <bhelgaas@google.com>
Date2015-08-18 02:00 +0200
SubjectRe: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources
Message-ID<pYCtP-5KG-5@gated-at.bofh.it>
On Mon, Jul 27, 2015 at 04:29:27PM -0700, Yinghai Lu wrote:
> We don't do sorting in those functions anymore, so change "sort" to "check"
> instead.

What *do* we do in those functions?  "Check" doesn't tell me anything.

> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> ---
>  drivers/pci/setup-bus.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index 6642a60..292f2a5 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -206,8 +206,8 @@ static resource_size_t __pci_resource_alignment(
>  	return r_align;
>  }
>  
> -/* Sort resources by alignment */
> -static void pdev_sort_resources(struct pci_dev *dev,
> +/* check resources and save to the list */
> +static void pdev_check_resources(struct pci_dev *dev,
>  				 struct list_head *realloc_head,
>  				 struct list_head *head)
>  {
> @@ -243,7 +243,7 @@ static void pdev_sort_resources(struct pci_dev *dev,
>  	}
>  }
>  
> -static void __dev_sort_resources(struct pci_dev *dev,
> +static void __dev_check_resources(struct pci_dev *dev,
>  				 struct list_head *realloc_head,
>  				 struct list_head *head)
>  {
> @@ -261,7 +261,7 @@ static void __dev_sort_resources(struct pci_dev *dev,
>  			return;
>  	}
>  
> -	pdev_sort_resources(dev, realloc_head, head);
> +	pdev_check_resources(dev, realloc_head, head);
>  }
>  
>  static inline void reset_resource(struct resource *res)
> @@ -561,7 +561,7 @@ static void pdev_assign_resources_sorted(struct pci_dev *dev,
>  {
>  	LIST_HEAD(head);
>  
> -	__dev_sort_resources(dev, add_head, &head);
> +	__dev_check_resources(dev, add_head, &head);
>  	__assign_resources_sorted(&head, add_head, fail_head);
>  
>  }
> @@ -574,7 +574,7 @@ static void pbus_assign_resources_sorted(const struct pci_bus *bus,
>  	LIST_HEAD(head);
>  
>  	list_for_each_entry(dev, &bus->devices, bus_list)
> -		__dev_sort_resources(dev, realloc_head, &head);
> +		__dev_check_resources(dev, realloc_head, &head);
>  
>  	__assign_resources_sorted(&head, realloc_head, fail_head);
>  }
> -- 
> 1.8.4.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1209493 — Re: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources

FromYinghai Lu <yinghai@kernel.org>
Date2015-08-18 23:40 +0200
SubjectRe: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources
Message-ID<pYWLV-27E-23@gated-at.bofh.it>
In reply to#1208966
On Mon, Aug 17, 2015 at 4:53 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Mon, Jul 27, 2015 at 04:29:27PM -0700, Yinghai Lu wrote:
>> We don't do sorting in those functions anymore, so change "sort" to "check"
>> instead.
>
> What *do* we do in those functions?  "Check" doesn't tell me anything.

Put all children devices' resources that need to assign in one list, and also
do some sanitary checking like if align is good or not.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1209499 — Re: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources

FromYinghai Lu <yinghai@kernel.org>
Date2015-08-18 23:50 +0200
SubjectRe: [PATCH v3 09/51] PCI: Rename pdev_sort_resources to pdev_check_resources
Message-ID<pYWVz-2nZ-11@gated-at.bofh.it>
In reply to#1209493
On Tue, Aug 18, 2015 at 2:36 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Mon, Aug 17, 2015 at 4:53 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Mon, Jul 27, 2015 at 04:29:27PM -0700, Yinghai Lu wrote:
>>> We don't do sorting in those functions anymore, so change "sort" to "check"
>>> instead.
>>
>> What *do* we do in those functions?  "Check" doesn't tell me anything.
>
> Put all children devices' resources that need to assign in one list, and also
> do some sanitary checking like if align is good or not.

or change to dev_assign_resources_prepare() ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web