Skip to content

Commit 2fd39aa

Browse files
akpm00jbarnes993
authored andcommitted
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>
1 parent a8d2dbd commit 2fd39aa

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

‎drivers/pci/hotplug/ibmphp_ebda.c‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void __init print_bus_info (void)
124124
{
125125
struct bus_info *ptr;
126126

127-
list_for_each_entry (ptr, &bus_info_head, bus_info_list) {
127+
list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
128128
debug ("%s - slot_min = %x\n", __func__, ptr->slot_min);
129129
debug ("%s - slot_max = %x\n", __func__, ptr->slot_max);
130130
debug ("%s - slot_count = %x\n", __func__, ptr->slot_count);
@@ -145,7 +145,7 @@ static void print_lo_info (void)
145145
{
146146
struct rio_detail *ptr;
147147
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) {
149149
debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
150150
debug ("%s - rio_type = %x\n", __func__, ptr->rio_type);
151151
debug ("%s - owner_id = %x\n", __func__, ptr->owner_id);
@@ -160,7 +160,7 @@ static void print_vg_info (void)
160160
{
161161
struct rio_detail *ptr;
162162
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) {
164164
debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id);
165165
debug ("%s - rio_type = %x\n", __func__, ptr->rio_type);
166166
debug ("%s - owner_id = %x\n", __func__, ptr->owner_id);
@@ -175,7 +175,7 @@ static void __init print_ebda_pci_rsrc (void)
175175
{
176176
struct ebda_pci_rsrc *ptr;
177177

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) {
179179
debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n",
180180
__func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr);
181181
}
@@ -185,7 +185,7 @@ static void __init print_ibm_slot (void)
185185
{
186186
struct slot *ptr;
187187

188-
list_for_each_entry (ptr, &ibmphp_slot_head, ibm_slot_list) {
188+
list_for_each_entry(ptr, &ibmphp_slot_head, ibm_slot_list) {
189189
debug ("%s - slot_number: %x\n", __func__, ptr->number);
190190
}
191191
}
@@ -194,7 +194,7 @@ static void __init print_opt_vg (void)
194194
{
195195
struct opt_rio *ptr;
196196
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) {
198198
debug ("%s - rio_type %x\n", __func__, ptr->rio_type);
199199
debug ("%s - chassis_num: %x\n", __func__, ptr->chassis_num);
200200
debug ("%s - first_slot_num: %x\n", __func__, ptr->first_slot_num);
@@ -207,7 +207,7 @@ static void __init print_ebda_hpc (void)
207207
struct controller *hpc_ptr;
208208
u16 index;
209209

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) {
211211
for (index = 0; index < hpc_ptr->slot_count; index++) {
212212
debug ("%s - physical slot#: %x\n", __func__, hpc_ptr->slots[index].slot_num);
213213
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)
444444
static struct opt_rio *search_opt_vg (u8 chassis_num)
445445
{
446446
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) {
448448
if (ptr->chassis_num == chassis_num)
449449
return ptr;
450450
}
@@ -456,7 +456,7 @@ static int __init combine_wpg_for_chassis (void)
456456
struct opt_rio *opt_rio_ptr = NULL;
457457
struct rio_detail *rio_detail_ptr = NULL;
458458

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) {
460460
opt_rio_ptr = search_opt_vg (rio_detail_ptr->chassis_num);
461461
if (!opt_rio_ptr) {
462462
opt_rio_ptr = kzalloc(sizeof(struct opt_rio), GFP_KERNEL);
@@ -482,7 +482,7 @@ static int __init combine_wpg_for_chassis (void)
482482
static struct opt_rio_lo *search_opt_lo (u8 chassis_num)
483483
{
484484
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) {
486486
if (ptr->chassis_num == chassis_num)
487487
return ptr;
488488
}
@@ -494,7 +494,7 @@ static int combine_wpg_for_expansion (void)
494494
struct opt_rio_lo *opt_rio_lo_ptr = NULL;
495495
struct rio_detail *rio_detail_ptr = NULL;
496496

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) {
498498
opt_rio_lo_ptr = search_opt_lo (rio_detail_ptr->chassis_num);
499499
if (!opt_rio_lo_ptr) {
500500
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)
529529
int rc = 0;
530530

531531
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) {
533533
if ((first_slot < opt_vg_ptr->first_slot_num) && (slot_num >= opt_vg_ptr->first_slot_num)) {
534534
rc = -ENODEV;
535535
break;
536536
}
537537
}
538538
} 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) {
540540
if ((first_slot < opt_lo_ptr->first_slot_num) && (slot_num >= opt_lo_ptr->first_slot_num)) {
541541
rc = -ENODEV;
542542
break;
@@ -550,7 +550,7 @@ static struct opt_rio_lo * find_rxe_num (u8 slot_num)
550550
{
551551
struct opt_rio_lo *opt_lo_ptr;
552552

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) {
554554
//check to see if this slot_num belongs to expansion box
555555
if ((slot_num >= opt_lo_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_lo_ptr->first_slot_num, 1)))
556556
return opt_lo_ptr;
@@ -562,7 +562,7 @@ static struct opt_rio * find_chassis_num (u8 slot_num)
562562
{
563563
struct opt_rio *opt_vg_ptr;
564564

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) {
566566
//check to see if this slot_num belongs to chassis
567567
if ((slot_num >= opt_vg_ptr->first_slot_num) && (!first_slot_num (slot_num, opt_vg_ptr->first_slot_num, 0)))
568568
return opt_vg_ptr;
@@ -578,7 +578,7 @@ static u8 calculate_first_slot (u8 slot_num)
578578
u8 first_slot = 1;
579579
struct slot * slot_cur;
580580

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) {
582582
if (slot_cur->ctrl) {
583583
if ((slot_cur->ctrl->ctlr_type != 4) && (slot_cur->ctrl->ending_slot_num > first_slot) && (slot_num > slot_cur->ctrl->ending_slot_num))
584584
first_slot = slot_cur->ctrl->ending_slot_num;
@@ -963,7 +963,7 @@ static int __init ebda_rsrc_controller (void)
963963

964964
} /* each hpc */
965965

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) {
967967
snprintf (tmp_slot->hotplug_slot->name, 30, "%s", create_file_name (tmp_slot));
968968
pci_hp_register(tmp_slot->hotplug_slot,
969969
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)
10661066
{
10671067
struct slot *slot;
10681068

1069-
list_for_each_entry (slot, &ibmphp_slot_head, ibm_slot_list) {
1069+
list_for_each_entry(slot, &ibmphp_slot_head, ibm_slot_list) {
10701070
if (slot->number == physical_num)
10711071
return slot;
10721072
}
@@ -1083,7 +1083,7 @@ struct bus_info *ibmphp_find_same_bus_num (u32 num)
10831083
{
10841084
struct bus_info *ptr;
10851085

1086-
list_for_each_entry (ptr, &bus_info_head, bus_info_list) {
1086+
list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
10871087
if (ptr->busno == num)
10881088
return ptr;
10891089
}
@@ -1097,7 +1097,7 @@ int ibmphp_get_bus_index (u8 num)
10971097
{
10981098
struct bus_info *ptr;
10991099

1100-
list_for_each_entry (ptr, &bus_info_head, bus_info_list) {
1100+
list_for_each_entry(ptr, &bus_info_head, bus_info_list) {
11011101
if (ptr->busno == num)
11021102
return ptr->index;
11031103
}
@@ -1172,7 +1172,7 @@ int ibmphp_register_pci (void)
11721172
struct controller *ctrl;
11731173
int rc = 0;
11741174

1175-
list_for_each_entry (ctrl, &ebda_hpc_head, ebda_hpc_list) {
1175+
list_for_each_entry(ctrl, &ebda_hpc_head, ebda_hpc_list) {
11761176
if (ctrl->ctlr_type == 1) {
11771177
rc = pci_register_driver(&ibmphp_driver);
11781178
break;
@@ -1186,7 +1186,7 @@ static int ibmphp_probe (struct pci_dev * dev, const struct pci_device_id *ids)
11861186

11871187
debug ("inside ibmphp_probe\n");
11881188

1189-
list_for_each_entry (ctrl, &ebda_hpc_head, ebda_hpc_list) {
1189+
list_for_each_entry(ctrl, &ebda_hpc_head, ebda_hpc_list) {
11901190
if (ctrl->ctlr_type == 1) {
11911191
if ((dev->devfn == ctrl->u.pci_ctlr.dev_fun) && (dev->bus->number == ctrl->u.pci_ctlr.bus)) {
11921192
ctrl->ctrl_dev = dev;

0 commit comments

Comments
 (0)