Skip to contentSkip to conversation

use list_for_each() i386/pci/common.c

patch-kj Applied maximilian attems 2 participants 2 messages Jul 23, 2004 – Aug 2, 2004

lore
Share & tools
lore
#0 lore raw

Use list_for_each() where applicable
- for (list = ymf_devs.next; list != &ymf_devs; list = list->next) {
+ list_for_each(list, &ymf_devs) {
pure cosmetic change, defined as a preprocessor macro in:
include/linux/list.h

patch against 2.6.7-bk20, please tell if you need against newer.

From: Domen Puncer <[email protected]>

---

 linux-2.6.7-bk20-max/arch/i386/pci/common.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/i386/pci/common.c renamed from arch/i386/pci/common.c~list_for_each-i386pci-common +1 -1
diff -puN arch/i386/pci/common.c~list_for_each-i386pci-common arch/i386/pci/common.c
@@ -70,7 +70,7 @@ static void __devinit pcibios_fixup_ghos
 	int i;
 
 	DBG("PCI: Scanning for ghost devices on bus %d\n", b->number);
-	for (ln=b->devices.next; ln != &b->devices; ln=ln->next) {
+	list_for_each(ln, &b->devices) {
 		d = pci_dev_b(ln);
 		if ((d->class >> 8) == PCI_CLASS_BRIDGE_HOST)
 			seen_host_bridge++;
Applied
#1 lore raw
Quoted 11 lines · maximilian attems

Use list_for_each() where applicable
- for (list = ymf_devs.next; list != &ymf_devs; list = list->next) {
+ list_for_each(list, &ymf_devs) {
pure cosmetic change, defined as a preprocessor macro in:
include/linux/list.h

patch against 2.6.7-bk20, please tell if you need against newer.

From: Domen Puncer <[email protected]>

Applied, thanks.

greg k-h