Skip to contentSkip to conversation

pci: Changed list_for_each to list_for_each_entry

PATCH New Cordelia 1 participant 1 message Aug 18, 2008 PCI

lore
Share & tools
lore

Cordelia

author
#0 lore raw

PATCH 1/1 pci: Changed list_for_each to list_for_each_entry

---
 drivers/pci/probe.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/pci/probe.c +1 -3
index a04498d..6a7ba36 100644
@@ -1245,13 +1245,11 @@ static int __init pci_sort_bf_cmp(const struct pci_dev *a, const struct pci_dev
  */
 static void __init pci_insertion_sort_klist(struct pci_dev *a, struct list_head *list)
 {
-	struct list_head *pos;
 	struct klist_node *n;
 	struct device *dev;
 	struct pci_dev *b;
 
-	list_for_each(pos, list) {
-		n = container_of(pos, struct klist_node, n_node);
+	list_for_each_entry(n, list, n_node) {
 		dev = container_of(n, struct device, knode_bus);
 		b = to_pci_dev(dev);
 		if (pci_sort_bf_cmp(a, b) <= 0) {
Signature · 1 line
1.5.4.3