Skip to contentSkip to conversation

use list_for_each() drivers/pci/setup-bus.c

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

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/drivers/pci/setup-bus.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/pci/setup-bus.c renamed from drivers/pci/setup-bus.c~list_for_each-pci-setup-bus +3 -2
diff -puN drivers/pci/setup-bus.c~list_for_each-pci-setup-bus drivers/pci/setup-bus.c
@@ -537,10 +537,11 @@ pci_assign_unassigned_resources(void)
 
 	/* Depth first, calculate sizes and alignments of all
 	   subordinate buses. */
-	for(ln=pci_root_buses.next; ln != &pci_root_buses; ln=ln->next)
+	list_for_each(ln, &pci_root_buses) {
 		pci_bus_size_bridges(pci_bus_b(ln));
+	}
 	/* Depth last, allocate resources and update the hardware. */
-	for(ln=pci_root_buses.next; ln != &pci_root_buses; ln=ln->next) {
+	list_for_each(ln, &pci_root_buses) {
 		pci_bus_assign_resources(pci_bus_b(ln));
 		pci_enable_bridges(pci_bus_b(ln));
 	}
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