All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Yijing Wang <wangyijing@huawei.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linuxppc-dev@lists.ozlabs.org, linux-pcmcia@lists.infradead.org,
	linux-pci@vger.kernel.org, Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [PATCH 1/6] PCI,acpiphp: Use list_for_each_entry() for bus traversal
Date: Fri, 14 Feb 2014 11:23:16 -0700	[thread overview]
Message-ID: <20140214182316.GB31093@google.com> (raw)
In-Reply-To: <1392297243-61848-1-git-send-email-wangyijing@huawei.com>

On Thu, Feb 13, 2014 at 09:13:58PM +0800, Yijing Wang wrote:
> Replace list_for_each() + pci_bus_b() with the simpler
> list_for_each_entry().
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>

I applied all six of these (please include a 0/6 cover letter in the
future; that's a nice place to note that I applied things) to
pci/list-for-each-entry for v3.15, thanks!

> ---
>  drivers/pci/hotplug/acpiphp_glue.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
> index cd929ae..aee6a0a 100644
> --- a/drivers/pci/hotplug/acpiphp_glue.c
> +++ b/drivers/pci/hotplug/acpiphp_glue.c
> @@ -450,7 +450,7 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
>   */
>  static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
>  {
> -	struct list_head *tmp;
> +	struct pci_bus *tmp;
>  	unsigned char max, n;
>  
>  	/*
> @@ -463,8 +463,8 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
>  	 */
>  	max = bus->busn_res.start;
>  
> -	list_for_each(tmp, &bus->children) {
> -		n = pci_bus_max_busnr(pci_bus_b(tmp));
> +	list_for_each_entry(tmp, &bus->children, node) {
> +		n = pci_bus_max_busnr(tmp);
>  		if (n > max)
>  			max = n;
>  	}
> -- 
> 1.7.1
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <bhelgaas@google.com>
To: Yijing Wang <wangyijing@huawei.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	David Airlie <airlied@linux.ie>,
	linux-pcmcia@lists.infradead.org,
	Hanjun Guo <guohanjun@huawei.com>,
	dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/6] PCI,acpiphp: Use list_for_each_entry() for bus traversal
Date: Fri, 14 Feb 2014 11:23:16 -0700	[thread overview]
Message-ID: <20140214182316.GB31093@google.com> (raw)
In-Reply-To: <1392297243-61848-1-git-send-email-wangyijing@huawei.com>

On Thu, Feb 13, 2014 at 09:13:58PM +0800, Yijing Wang wrote:
> Replace list_for_each() + pci_bus_b() with the simpler
> list_for_each_entry().
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>

I applied all six of these (please include a 0/6 cover letter in the
future; that's a nice place to note that I applied things) to
pci/list-for-each-entry for v3.15, thanks!

> ---
>  drivers/pci/hotplug/acpiphp_glue.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
> index cd929ae..aee6a0a 100644
> --- a/drivers/pci/hotplug/acpiphp_glue.c
> +++ b/drivers/pci/hotplug/acpiphp_glue.c
> @@ -450,7 +450,7 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
>   */
>  static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
>  {
> -	struct list_head *tmp;
> +	struct pci_bus *tmp;
>  	unsigned char max, n;
>  
>  	/*
> @@ -463,8 +463,8 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
>  	 */
>  	max = bus->busn_res.start;
>  
> -	list_for_each(tmp, &bus->children) {
> -		n = pci_bus_max_busnr(pci_bus_b(tmp));
> +	list_for_each_entry(tmp, &bus->children, node) {
> +		n = pci_bus_max_busnr(tmp);
>  		if (n > max)
>  			max = n;
>  	}
> -- 
> 1.7.1
> 
> 

  parent reply	other threads:[~2014-02-14 18:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 13:13 [PATCH 1/6] PCI,acpiphp: Use list_for_each_entry() for bus traversal Yijing Wang
2014-02-13 13:13 ` Yijing Wang
2014-02-13 13:13 ` Yijing Wang
2014-02-13 13:13 ` [PATCH 2/6] PCI/arm: " Yijing Wang
2014-02-13 13:13   ` Yijing Wang
2014-02-13 13:13   ` Yijing Wang
2014-02-13 14:46   ` Russell King - ARM Linux
2014-02-13 14:46     ` Russell King - ARM Linux
2014-02-13 13:14 ` [PATCH 3/6] PCI/drm: " Yijing Wang
2014-02-13 13:14   ` Yijing Wang
2014-02-13 13:14 ` [PATCH 4/6] PCI/powerpc: " Yijing Wang
2014-02-13 13:14   ` Yijing Wang
2014-02-13 13:14 ` [PATCH 5/6] PCI/pcmcia: " Yijing Wang
2014-02-13 13:14   ` Yijing Wang
2014-02-13 13:14   ` Yijing Wang
2014-02-13 13:14 ` [PATCH 6/6] PCI: Remove pci_bus_b() and use list_entry() directly Yijing Wang
2014-02-13 13:14   ` Yijing Wang
2014-02-13 13:14   ` Yijing Wang
2014-02-13 23:54 ` [PATCH 1/6] PCI,acpiphp: Use list_for_each_entry() for bus traversal Rafael J. Wysocki
2014-02-13 23:54   ` [PATCH 1/6] PCI, acpiphp: " Rafael J. Wysocki
2014-02-14  2:19   ` [PATCH 1/6] PCI,acpiphp: " Yijing Wang
2014-02-14  2:19     ` [PATCH 1/6] PCI, acpiphp: " Yijing Wang
2014-02-14 13:39     ` [PATCH 1/6] PCI,acpiphp: " Rafael J. Wysocki
2014-02-14 13:39       ` [PATCH 1/6] PCI, acpiphp: " Rafael J. Wysocki
2014-02-15  0:49       ` [PATCH 1/6] PCI,acpiphp: " Yijing Wang
2014-02-15  0:49         ` [PATCH 1/6] PCI, acpiphp: " Yijing Wang
2014-02-14 18:23 ` Bjorn Helgaas [this message]
2014-02-14 18:23   ` [PATCH 1/6] PCI,acpiphp: " Bjorn Helgaas
2014-02-15  0:52   ` Yijing Wang
2014-02-15  0:52     ` [PATCH 1/6] PCI, acpiphp: " Yijing Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140214182316.GB31093@google.com \
    --to=bhelgaas@google.com \
    --cc=airlied@linux.ie \
    --cc=benh@kernel.crashing.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guohanjun@huawei.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=wangyijing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.