aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakpm@linux-foundation.org <akpm@linux-foundation.org>2008-08-22 16:30:14 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 13:53:45 -0400
commit2fd39aa7c2f3d696814abb3e8962c759eee484f3 (patch)
tree9e4d769b28bff575a638aaadb2c0c7c73d57e674
parenta8d2dbd38481e0c35c6bdd8196dd38a42ae45d02 (diff)
PCI: ibmphp: list_for_each to list_for_each_entry-checkpatch cleanups
Please run checkpatch prior to sending patches, this one fixes several style issues with the list_for_each conversion patch. Cc: Cordelia Sam <cordesam@gmail.com> Cc: Cordelia Sam <cordsam@linux.vnet.ibm.com> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/pci/hotplug/ibmphp_ebda.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 1bc08a5b2c7d..8cfd1c4926c8 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -124,7 +124,7 @@ static void __init print_bus_info (void)
124{ 124{
125 struct bus_info *ptr; 125 struct bus_info *ptr;
126 126
127 list_for_each_entry (ptr, &bus_info_head, bus_info_list) { 127 list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
128 debug ("%s - slot_min = %x\n", __func__, ptr->slot_min); 128 debug ("%s - slot_min = %x\n", __func__, ptr->slot_min);
129 debug ("%s - slot_max = %x\n", __func__, ptr->slot_max); 129 debug ("%s - slot_max = %x\n", __func__, ptr->slot_max);
130 debug ("%s - slot_count = %x\n", __func__, ptr->slot_count); 130 debug ("%s - slot_count = %x\n", __func__, ptr->slot_count);
@@ -145,7 +145,7 @@ static void print_lo_info (void)
145{ 145{
146 struct rio_detail *ptr; 146 struct rio_detail *ptr;
147 debug ("print_lo_info ----\n"); 147 debug ("print_lo_info ----\n");
148 list_for_each_entry (ptr, &rio_lo_head, rio_detail_list) { 148 list_for_each_entry(ptr, &rio_lo_head, rio_detail_list) {
149 debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id); 149 debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
150 debug ("%s - rio_type = %x\n", __func__, ptr->rio_type); 150 debug ("%s - rio_type = %x\n", __func__, ptr->rio_type);
151 debug ("%s - owner_id = %x\n", __func__, ptr->owner_id); 151 debug ("%s - owner_id = %x\n", __func__, ptr->owner_id);
@@ -160,7 +160,7 @@ static void print_vg_info (void)
160{ 160{
161 struct rio_detail *ptr; 161 struct rio_detail *ptr;
162 debug ("%s ---\n", __func__); 162 debug ("%s ---\n", __func__);
163 list_for_each_entry (ptr, &rio_vg_head, rio_detail_list) { 163 list_for_each_entry(ptr, &rio_vg_head, rio_detail_list) {
164 debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id); 164 debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
165 debug ("%s - rio_type = %x\n", __func__, ptr->rio_type); 165 debug ("%s - rio_type = %x\n", __func__, ptr->rio_type);
166 debug ("%s - owner_id = %x\n", __func__, ptr->owner_id); 166 debug ("%s - owner_id = %x\n", __func__, ptr->owner_id);
@@ -175,7 +175,7 @@ static void __init print_ebda_pci_rsrc (void)
175{ 175{
176 struct ebda_pci_rsrc *ptr; 176 struct ebda_pci_rsrc *ptr;
177 177
178 list_for_each_entry (ptr, &ibmphp_ebda_pci_rsrc_head, ebda_pci_rsrc_list) { 178 list_for_each_entry(ptr, &ibmphp_ebda_pci_rsrc_head, ebda_pci_rsrc_list) {
179 debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n", 179 debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
180 __func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr); 180 __func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
181 } 181 }
@@ -185,7 +185,7 @@ static void __init print_ibm_slot (void)
185{ 185{
186 struct slot *ptr; 186 struct slot *ptr;
187 187
188 list_for_each_entry (ptr, &ibmphp_slot_head, ibm_slot_list) { 188 list_for_each_entry(ptr, &ibmphp_slot_head, ibm_slot_list) {
189 debug ("%s - slot_number: %x\n", __func__, ptr->number); 189 debug ("%s - slot_number: %x\n", __func__, ptr->number);
190 } 190 }
191} 191}
@@ -194,7 +194,7 @@ static void __init print_opt_vg (void)
194{ 194{
195 struct opt_rio *ptr; 195 struct opt_rio *ptr;
196 debug ("%s ---\n", __func__); 196 debug ("%s ---\n", __func__);
197 list_for_each_entry (ptr, &opt_vg_head, opt_rio_list) { 197 list_for_each_entry(ptr, &opt_vg_head, opt_rio_list) {
198 debug ("%s - rio_type %x\n", __func__, ptr->rio_type); 198 debug ("%s - rio_type %x\n", __func__, ptr->rio_type);
199 debug ("%s - chassis_num: %x\n", __func__, ptr->chassis_num); 199 debug ("%s - chassis_num: %x\n", __func__, ptr->chassis_num);
200 debug ("%s - first_slot_num: %x\n", __func__, ptr->first_slot_num); 200 debug ("%s - first_slot_num: %x\n", __func__, ptr->first_slot_num);
@@ -207,7 +207,7 @@ static void __init print_ebda_hpc (void)
207 struct controller *hpc_ptr; 207 struct controller *hpc_ptr;
208 u16 index; 208 u16 index;
209 209
210 list_for_each_entry (hpc_ptr, &ebda_hpc_head, ebda_hpc_list) { 210 list_for_each_entry(hpc_ptr, &ebda_hpc_head, ebda_hpc_list) {
211 for (index = 0; index < hpc_ptr->slot_count; index++) { 211 for (index = 0; index < hpc_ptr->slot_count; index++) {
212 debug ("%s - physical slot#: %x\n", __func__, hpc_ptr->slots[index].slot_num); 212 debug ("%s - physical slot#: %x\n", __func__, hpc_ptr->slots[index].slot_num);
213 debug ("%s - pci bus# of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_bus_num); 213 debug ("%s - pci bus# of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_bus_num);
@@ -444,7 +444,7 @@ static int __init ebda_rio_table (void)
444static struct opt_rio *search_opt_vg (u8 chassis_num) 444static struct opt_rio *search_opt_vg (u8 chassis_num)
445{ 445{
446 struct opt_rio *ptr; 446 struct opt_rio *ptr;
447 list_for_each_entry (ptr, &opt_vg_head, opt_rio_list) { 447 list_for_each_entry(ptr, &opt_vg_head, opt_rio_list) {
448 if (ptr->chassis_num == chassis_num) 448 if (ptr->chassis_num == chassis_num)
449 return ptr; 449 return ptr;
450 } 450 }
@@ -456,7 +456,7 @@ static int __init combine_wpg_for_chassis (void)
456 struct opt_rio *opt_rio_ptr = NULL; 456 struct opt_rio *opt_rio_ptr = NULL;
457 struct rio_detail *rio_detail_ptr = NULL; 457 struct rio_detail *rio_detail_ptr = NULL;
458 458
459 list_for_each_entry (rio_detail_ptr, &rio_vg_head, rio_detail_list) { 459 list_for_each_entry(rio_detail_ptr, &rio_vg_head, rio_detail_list) {
460 opt_rio_ptr = search_opt_vg (rio_detail_ptr->chassis_num); 460 opt_rio_ptr = search_opt_vg (rio_detail_ptr->chassis_num);
461 if (!opt_rio_ptr) { 461 if (!opt_rio_ptr) {
462 opt_rio_ptr = kzalloc(sizeof(struct opt_rio), GFP_KERNEL); 462 opt_rio_ptr = kzalloc(sizeof(struct opt_rio), GFP_KERNEL);
@@ -482,7 +482,7 @@ static int __init combine_wpg_for_chassis (void)
482static struct opt_rio_lo *search_opt_lo (u8 chassis_num) 482static struct opt_rio_lo *search_opt_lo (u8 chassis_num)
483{ 483{
484 struct opt_rio_lo *ptr; 484 struct opt_rio_lo *ptr;
485 list_for_each_entry (ptr, &opt_lo_head, opt_rio_lo_list) { 485 list_for_each_entry(ptr, &opt_lo_head, opt_rio_lo_list) {
486 if (ptr->chassis_num == chassis_num) 486 if (ptr->chassis_num == chassis_num)
487 return ptr; 487 return ptr;
488 } 488 }
@@ -494,7 +494,7 @@ static int combine_wpg_for_expansion (void)
494 struct opt_rio_lo *opt_rio_lo_ptr = NULL; 494 struct opt_rio_lo *opt_rio_lo_ptr = NULL;
495 struct rio_detail *rio_detail_ptr = NULL; 495 struct rio_detail *rio_detail_ptr = NULL;
496 496
497 list_for_each_entry (rio_detail_ptr, &rio_lo_head, rio_detail_list) { 497 list_for_each_entry(rio_detail_ptr, &rio_lo_head, rio_detail_list) {
498 opt_rio_lo_ptr = search_opt_lo (rio_detail_ptr->chassis_num); 498 opt_rio_lo_ptr = search_opt_lo (rio_detail_ptr->chassis_num);
499 if (!opt_rio_lo_ptr) { 499 if (!opt_rio_lo_ptr) {
500 opt_rio_lo_ptr = kzalloc(sizeof(struct opt_rio_lo), GFP_KERNEL); 500 opt_rio_lo_ptr = kzalloc(sizeof(struct opt_rio_lo), GFP_KERNEL);
@@ -529,14 +529,14 @@ static int first_slot_num (u8 slot_num, u8 first_slot, u8 var)
529 int rc = 0; 529 int rc = 0;
530 530
531 if (!var) { 531 if (!var) {
532 list_for_each_entry (opt_vg_ptr, &opt_vg_head, opt_rio_list) { 532 list_for_each_entry(opt_vg_ptr, &opt_vg_head, opt_rio_list) {
533 if ((first_slot < opt_vg_ptr->first_slot_num) && (slot_num >= opt_vg_ptr->first_slot_num)) { 533 if ((first_slot < opt_vg_ptr->first_slot_num) && (slot_num >= opt_vg_ptr->first_slot_num)) {
534 rc = -ENODEV; 534 rc = -ENODEV;
535 break; 535 break;
536 } 536 }
537 } 537 }
538 } else { 538 } else {
539 list_for_each_entry (opt_lo_ptr, &opt_lo_head, opt_rio_lo_list) { 539 list_for_each_entry(opt_lo_ptr, &opt_lo_head, opt_rio_lo_list) {
540 if ((first_slot < opt_lo_ptr->first_slot_num) && (slot_num >= opt_lo_ptr->first_slot_num)) { 540 if ((first_slot < opt_lo_ptr->first_slot_num) && (slot_num >= opt_lo_ptr->first_slot_num)) {
541 rc = -ENODEV; 541 rc = -ENODEV;
542 break; 542 break;
@@ -550,7 +550,7 @@ static struct opt_rio_lo * find_rxe_num (u8 slot_num)
550{ 550{
551 struct opt_rio_lo *opt_lo_ptr; 551 struct opt_rio_lo *opt_lo_ptr;
552 552
553 list_for_each_entry (opt_lo_ptr, &opt_lo_head, opt_rio_lo_list) { 553 list_for_each_entry(opt_lo_ptr, &opt_lo_head, opt_rio_lo_list) {
554 //check to see if this slot_num belongs to expansion box 554 //check to see if this slot_num belongs to expansion box
555 if ((slot_num >= opt_lo_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_lo_ptr->first_slot_num, 1))) 555 if ((slot_num >= opt_lo_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_lo_ptr->first_slot_num, 1)))
556 return opt_lo_ptr; 556 return opt_lo_ptr;
@@ -562,7 +562,7 @@ static struct opt_rio * find_chassis_num (u8 slot_num)
562{ 562{
563 struct opt_rio *opt_vg_ptr; 563 struct opt_rio *opt_vg_ptr;
564 564
565 list_for_each_entry (opt_vg_ptr, &opt_vg_head, opt_rio_list) { 565 list_for_each_entry(opt_vg_ptr, &opt_vg_head, opt_rio_list) {
566 //check to see if this slot_num belongs to chassis 566 //check to see if this slot_num belongs to chassis
567 if ((slot_num >= opt_vg_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_vg_ptr->first_slot_num, 0))) 567 if ((slot_num >= opt_vg_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_vg_ptr->first_slot_num, 0)))
568 return opt_vg_ptr; 568 return opt_vg_ptr;
@@ -578,7 +578,7 @@ static u8 calculate_first_slot (u8 slot_num)
578 u8 first_slot = 1; 578 u8 first_slot = 1;
579 struct slot * slot_cur; 579 struct slot * slot_cur;
580 580
581 list_for_each_entry (slot_cur, &ibmphp_slot_head, ibm_slot_list) { 581 list_for_each_entry(slot_cur, &ibmphp_slot_head, ibm_slot_list) {
582 if (slot_cur->ctrl) { 582 if (slot_cur->ctrl) {
583 if ((slot_cur->ctrl->ctlr_type != 4) && (slot_cur->ctrl->ending_slot_num > first_slot) && (slot_num > slot_cur->ctrl->ending_slot_num)) 583 if ((slot_cur->ctrl->ctlr_type != 4) && (slot_cur->ctrl->ending_slot_num > first_slot) && (slot_num > slot_cur->ctrl->ending_slot_num))
584 first_slot = slot_cur->ctrl->ending_slot_num; 584 first_slot = slot_cur->ctrl->ending_slot_num;
@@ -963,7 +963,7 @@ static int __init ebda_rsrc_controller (void)
963 963
964 } /* each hpc */ 964 } /* each hpc */
965 965
966 list_for_each_entry (tmp_slot, &ibmphp_slot_head, ibm_slot_list) { 966 list_for_each_entry(tmp_slot, &ibmphp_slot_head, ibm_slot_list) {
967 snprintf (tmp_slot->hotplug_slot->name, 30, "%s", create_file_name (tmp_slot)); 967 snprintf (tmp_slot->hotplug_slot->name, 30, "%s", create_file_name (tmp_slot));
968 pci_hp_register(tmp_slot->hotplug_slot, 968 pci_hp_register(tmp_slot->hotplug_slot,
969 pci_find_bus(0, tmp_slot->bus), tmp_slot->device); 969 pci_find_bus(0, tmp_slot->bus), tmp_slot->device);
@@ -1066,7 +1066,7 @@ struct slot *ibmphp_get_slot_from_physical_num (u8 physical_num)
1066{ 1066{
1067 struct slot *slot; 1067 struct slot *slot;
1068 1068
1069 list_for_each_entry (slot, &ibmphp_slot_head, ibm_slot_list) { 1069 list_for_each_entry(slot, &ibmphp_slot_head, ibm_slot_list) {
1070 if (slot->number == physical_num) 1070 if (slot->number == physical_num)
1071 return slot; 1071 return slot;
1072 } 1072 }
@@ -1083,7 +1083,7 @@ struct bus_info *ibmphp_find_same_bus_num (u32 num)
1083{ 1083{
1084 struct bus_info *ptr; 1084 struct bus_info *ptr;
1085 1085
1086 list_for_each_entry (ptr, &bus_info_head, bus_info_list) { 1086 list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
1087 if (ptr->busno == num) 1087 if (ptr->busno == num)
1088 return ptr; 1088 return ptr;
1089 } 1089 }
@@ -1097,7 +1097,7 @@ int ibmphp_get_bus_index (u8 num)
1097{ 1097{
1098 struct bus_info *ptr; 1098 struct bus_info *ptr;
1099 1099
1100 list_for_each_entry (ptr, &bus_info_head, bus_info_list) { 1100 list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
1101 if (ptr->busno == num) 1101 if (ptr->busno == num)
1102 return ptr->index; 1102 return ptr->index;
1103 } 1103 }
@@ -1172,7 +1172,7 @@ int ibmphp_register_pci (void)
1172 struct controller *ctrl; 1172 struct controller *ctrl;
1173 int rc = 0; 1173 int rc = 0;
1174 1174
1175 list_for_each_entry (ctrl, &ebda_hpc_head, ebda_hpc_list) { 1175 list_for_each_entry(ctrl, &ebda_hpc_head, ebda_hpc_list) {
1176 if (ctrl->ctlr_type == 1) { 1176 if (ctrl->ctlr_type == 1) {
1177 rc = pci_register_driver(&ibmphp_driver); 1177 rc = pci_register_driver(&ibmphp_driver);
1178 break; 1178 break;
@@ -1186,7 +1186,7 @@ static int ibmphp_probe (struct pci_dev * dev, const struct pci_device_id *ids)
1186 1186
1187 debug ("inside ibmphp_probe\n"); 1187 debug ("inside ibmphp_probe\n");
1188 1188
1189 list_for_each_entry (ctrl, &ebda_hpc_head, ebda_hpc_list) { 1189 list_for_each_entry(ctrl, &ebda_hpc_head, ebda_hpc_list) {
1190 if (ctrl->ctlr_type == 1) { 1190 if (ctrl->ctlr_type == 1) {
1191 if ((dev->devfn == ctrl->u.pci_ctlr.dev_fun) && (dev->bus->number == ctrl->u.pci_ctlr.bus)) { 1191 if ((dev->devfn == ctrl->u.pci_ctlr.dev_fun) && (dev->bus->number == ctrl->u.pci_ctlr.bus)) {
1192 ctrl->ctrl_dev = dev; 1192 ctrl->ctrl_dev = dev;