linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>
Subject: [PATCH 5/6] sgi-agp: Use list_for_each_entry() for bus->devices traversal
Date: Thu, 16 Aug 2012 17:26:41 -0600	[thread overview]
Message-ID: <20120816232641.3662.52757.stgit@bhelgaas.mtv.corp.google.com> (raw)
In-Reply-To: <20120816232620.3662.90438.stgit@bhelgaas.mtv.corp.google.com>

Replace list_for_each() + pci_dev_b() with the simpler
list_for_each_entry().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: David Airlie <airlied@linux.ie>
---
 drivers/char/agp/sgi-agp.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index 1920003..3a5af2f 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -289,12 +289,11 @@ static int __devinit agp_sgi_init(void)
 
 	j = 0;
 	list_for_each_entry(info, &tioca_list, ca_list) {
-		struct list_head *tmp;
 		if (list_empty(info->ca_devices))
 			continue;
-		list_for_each(tmp, info->ca_devices) {
+		list_for_each_entry(pdev, info->ca_devices, bus_list) {
 			u8 cap_ptr;
-			pdev = pci_dev_b(tmp);
+
 			if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8))
 				continue;
 			cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);


  parent reply	other threads:[~2012-08-16 23:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 23:26 [PATCH 1/6] PCI: Use list_for_each_entry() for bus->devices traversal Bjorn Helgaas
2012-08-16 23:26 ` [PATCH 2/6] frv/PCI: " Bjorn Helgaas
2012-08-16 23:26 ` [PATCH 3/6] parisc/PCI: Enable PERR/SERR on all devices Bjorn Helgaas
2012-08-16 23:26 ` [PATCH 4/6] parisc/PCI: Use list_for_each_entry() for bus->devices traversal Bjorn Helgaas
2012-08-16 23:26 ` Bjorn Helgaas [this message]
2012-08-16 23:26 ` [PATCH 6/6] PCI: Remove unused pci_dev_b() Bjorn Helgaas
2012-08-17 23:37 ` [PATCH 1/6] PCI: Use list_for_each_entry() for bus->devices traversal Bjorn Helgaas

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=20120816232641.3662.52757.stgit@bhelgaas.mtv.corp.google.com \
    --to=bhelgaas@google.com \
    --cc=airlied@linux.ie \
    --cc=linux-pci@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).