Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI Hotplug: cpqphp: stray whitespace cleanups

Clean up all stray whitespace issues, such as trailing whitespace,
spaces before tabs, etc. and whatever else vim's c_space_errors
highlights in red.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Alex Chiang and committed by
Jesse Barnes
861fefbf d09ee968

+110 -122
+29 -29
drivers/pci/hotplug/cpqphp.h
··· 150 150 151 151 /* offsets to the controller registers based on the above structure layout */ 152 152 enum ctrl_offsets { 153 - SLOT_RST = offsetof(struct ctrl_reg, slot_RST), 153 + SLOT_RST = offsetof(struct ctrl_reg, slot_RST), 154 154 SLOT_ENABLE = offsetof(struct ctrl_reg, slot_enable), 155 155 MISC = offsetof(struct ctrl_reg, misc), 156 156 LED_CONTROL = offsetof(struct ctrl_reg, led_control), 157 157 INT_INPUT_CLEAR = offsetof(struct ctrl_reg, int_input_clear), 158 - INT_MASK = offsetof(struct ctrl_reg, int_mask), 159 - CTRL_RESERVED0 = offsetof(struct ctrl_reg, reserved0), 158 + INT_MASK = offsetof(struct ctrl_reg, int_mask), 159 + CTRL_RESERVED0 = offsetof(struct ctrl_reg, reserved0), 160 160 CTRL_RESERVED1 = offsetof(struct ctrl_reg, reserved1), 161 161 CTRL_RESERVED2 = offsetof(struct ctrl_reg, reserved1), 162 - GEN_OUTPUT_AB = offsetof(struct ctrl_reg, gen_output_AB), 163 - NON_INT_INPUT = offsetof(struct ctrl_reg, non_int_input), 162 + GEN_OUTPUT_AB = offsetof(struct ctrl_reg, gen_output_AB), 163 + NON_INT_INPUT = offsetof(struct ctrl_reg, non_int_input), 164 164 CTRL_RESERVED3 = offsetof(struct ctrl_reg, reserved3), 165 165 CTRL_RESERVED4 = offsetof(struct ctrl_reg, reserved4), 166 166 CTRL_RESERVED5 = offsetof(struct ctrl_reg, reserved5), 167 167 CTRL_RESERVED6 = offsetof(struct ctrl_reg, reserved6), 168 168 CTRL_RESERVED7 = offsetof(struct ctrl_reg, reserved7), 169 169 CTRL_RESERVED8 = offsetof(struct ctrl_reg, reserved8), 170 - SLOT_MASK = offsetof(struct ctrl_reg, slot_mask), 171 - CTRL_RESERVED9 = offsetof(struct ctrl_reg, reserved9), 170 + SLOT_MASK = offsetof(struct ctrl_reg, slot_mask), 171 + CTRL_RESERVED9 = offsetof(struct ctrl_reg, reserved9), 172 172 CTRL_RESERVED10 = offsetof(struct ctrl_reg, reserved10), 173 173 CTRL_RESERVED11 = offsetof(struct ctrl_reg, reserved11), 174 174 SLOT_SERR = offsetof(struct ctrl_reg, slot_SERR), ··· 220 220 /* offsets to the hotplug slot resource table registers based on the above structure layout */ 221 221 enum slot_rt_offsets { 222 222 DEV_FUNC = offsetof(struct slot_rt, dev_func), 223 - PRIMARY_BUS = offsetof(struct slot_rt, primary_bus), 224 - SECONDARY_BUS = offsetof(struct slot_rt, secondary_bus), 225 - MAX_BUS = offsetof(struct slot_rt, max_bus), 226 - IO_BASE = offsetof(struct slot_rt, io_base), 227 - IO_LENGTH = offsetof(struct slot_rt, io_length), 228 - MEM_BASE = offsetof(struct slot_rt, mem_base), 229 - MEM_LENGTH = offsetof(struct slot_rt, mem_length), 230 - PRE_MEM_BASE = offsetof(struct slot_rt, pre_mem_base), 231 - PRE_MEM_LENGTH = offsetof(struct slot_rt, pre_mem_length), 223 + PRIMARY_BUS = offsetof(struct slot_rt, primary_bus), 224 + SECONDARY_BUS = offsetof(struct slot_rt, secondary_bus), 225 + MAX_BUS = offsetof(struct slot_rt, max_bus), 226 + IO_BASE = offsetof(struct slot_rt, io_base), 227 + IO_LENGTH = offsetof(struct slot_rt, io_length), 228 + MEM_BASE = offsetof(struct slot_rt, mem_base), 229 + MEM_LENGTH = offsetof(struct slot_rt, mem_length), 230 + PRE_MEM_BASE = offsetof(struct slot_rt, pre_mem_base), 231 + PRE_MEM_LENGTH = offsetof(struct slot_rt, pre_mem_length), 232 232 }; 233 233 234 234 struct pci_func { ··· 471 471 static inline void set_SOGO(struct controller *ctrl) 472 472 { 473 473 u16 misc; 474 - 474 + 475 475 misc = readw(ctrl->hpc_reg + MISC); 476 476 misc = (misc | 0x0001) & 0xFFFB; 477 477 writew(misc, ctrl->hpc_reg + MISC); ··· 481 481 static inline void amber_LED_on(struct controller *ctrl, u8 slot) 482 482 { 483 483 u32 led_control; 484 - 484 + 485 485 led_control = readl(ctrl->hpc_reg + LED_CONTROL); 486 486 led_control |= (0x01010000L << slot); 487 487 writel(led_control, ctrl->hpc_reg + LED_CONTROL); ··· 491 491 static inline void amber_LED_off(struct controller *ctrl, u8 slot) 492 492 { 493 493 u32 led_control; 494 - 494 + 495 495 led_control = readl(ctrl->hpc_reg + LED_CONTROL); 496 496 led_control &= ~(0x01010000L << slot); 497 497 writel(led_control, ctrl->hpc_reg + LED_CONTROL); ··· 504 504 505 505 led_control = readl(ctrl->hpc_reg + LED_CONTROL); 506 506 led_control &= (0x01010000L << slot); 507 - 507 + 508 508 return led_control ? 1 : 0; 509 509 } 510 510 ··· 512 512 static inline void green_LED_on(struct controller *ctrl, u8 slot) 513 513 { 514 514 u32 led_control; 515 - 515 + 516 516 led_control = readl(ctrl->hpc_reg + LED_CONTROL); 517 517 led_control |= 0x0101L << slot; 518 518 writel(led_control, ctrl->hpc_reg + LED_CONTROL); ··· 521 521 static inline void green_LED_off(struct controller *ctrl, u8 slot) 522 522 { 523 523 u32 led_control; 524 - 524 + 525 525 led_control = readl(ctrl->hpc_reg + LED_CONTROL); 526 526 led_control &= ~(0x0101L << slot); 527 527 writel(led_control, ctrl->hpc_reg + LED_CONTROL); ··· 531 531 static inline void green_LED_blink(struct controller *ctrl, u8 slot) 532 532 { 533 533 u32 led_control; 534 - 534 + 535 535 led_control = readl(ctrl->hpc_reg + LED_CONTROL); 536 536 led_control &= ~(0x0101L << slot); 537 537 led_control |= (0x0001L << slot); ··· 586 586 static inline u8 get_controller_speed(struct controller *ctrl) 587 587 { 588 588 u8 curr_freq; 589 - u16 misc; 590 - 589 + u16 misc; 590 + 591 591 if (ctrl->pcix_support) { 592 592 curr_freq = readb(ctrl->hpc_reg + NEXT_CURR_FREQ); 593 - if ((curr_freq & 0xB0) == 0xB0) 593 + if ((curr_freq & 0xB0) == 0xB0) 594 594 return PCI_SPEED_133MHz_PCIX; 595 595 if ((curr_freq & 0xA0) == 0xA0) 596 596 return PCI_SPEED_100MHz_PCIX; ··· 602 602 return PCI_SPEED_33MHz; 603 603 } 604 604 605 - misc = readw(ctrl->hpc_reg + MISC); 606 - return (misc & 0x0800) ? PCI_SPEED_66MHz : PCI_SPEED_33MHz; 605 + misc = readw(ctrl->hpc_reg + MISC); 606 + return (misc & 0x0800) ? PCI_SPEED_66MHz : PCI_SPEED_33MHz; 607 607 } 608 - 608 + 609 609 610 610 /* 611 611 * get_adapter_speed - find the max supported frequency/mode of adapter.
+22 -34
drivers/pci/hotplug/cpqphp_core.c
··· 25 25 * Send feedback to <greg@kroah.com> 26 26 * 27 27 * Jan 12, 2003 - Added 66/100/133MHz PCI-X support, 28 - * Torben Mathiasen <torben.mathiasen@hp.com> 28 + * Torben Mathiasen <torben.mathiasen@hp.com> 29 29 * 30 30 */ 31 31 ··· 100 100 .get_attention_status = get_attention_status, 101 101 .get_latch_status = get_latch_status, 102 102 .get_adapter_status = get_adapter_status, 103 - .get_max_bus_speed = get_max_bus_speed, 104 - .get_cur_bus_speed = get_cur_bus_speed, 103 + .get_max_bus_speed = get_max_bus_speed, 104 + .get_cur_bus_speed = get_cur_bus_speed, 105 105 }; 106 106 107 107 ··· 144 144 break; 145 145 } 146 146 } 147 - 147 + 148 148 if (!status) 149 149 fp = NULL; 150 150 ··· 292 292 if (!smbios_table) 293 293 return NULL; 294 294 295 - if (!previous) { 295 + if (!previous) { 296 296 previous = smbios_start; 297 297 } else { 298 298 previous = get_subsequent_smbios_entry(smbios_start, ··· 300 300 } 301 301 302 302 while (previous) { 303 - if (readb(previous + SMBIOS_GENERIC_TYPE) != type) { 303 + if (readb(previous + SMBIOS_GENERIC_TYPE) != type) { 304 304 previous = get_subsequent_smbios_entry(smbios_start, 305 305 smbios_table, previous); 306 306 } else { ··· 426 426 cpq_get_latch_status(ctrl, slot); 427 427 hotplug_slot_info->adapter_status = 428 428 get_presence_status(ctrl, slot); 429 - 429 + 430 430 dbg("registering bus %d, dev %d, number %d, " 431 431 "ctrl->slot_device_offset %d, slot %d\n", 432 432 slot->bus, slot->device, ··· 440 440 err("pci_hp_register failed with error %d\n", result); 441 441 goto error_info; 442 442 } 443 - 443 + 444 444 slot->next = ctrl->slot; 445 445 ctrl->slot = slot; 446 446 ··· 563 563 564 564 } 565 565 566 - // If we got here, we didn't find an entry in the IRQ mapping table 567 - // for the target PCI device. If we did determine that the target 568 - // device is on the other side of a PCI-to-PCI bridge, return the 566 + // If we got here, we didn't find an entry in the IRQ mapping table 567 + // for the target PCI device. If we did determine that the target 568 + // device is on the other side of a PCI-to-PCI bridge, return the 569 569 // slot number for the bridge. 570 570 if (bridgeSlot != 0xFF) { 571 571 *slot = bridgeSlot; ··· 719 719 720 720 dbg("%s - physical_slot = %s\n", __func__, slot_name(slot)); 721 721 722 - return cpqhp_hardware_test(ctrl, value); 722 + return cpqhp_hardware_test(ctrl, value); 723 723 } 724 724 725 725 ··· 738 738 { 739 739 struct slot *slot = hotplug_slot->private; 740 740 struct controller *ctrl = slot->ctrl; 741 - 741 + 742 742 dbg("%s - physical_slot = %s\n", __func__, slot_name(slot)); 743 743 744 744 *value = cpq_get_attention_status(ctrl, slot); ··· 832 832 } 833 833 834 834 /* Check for the proper subsytem ID's 835 - * Intel uses a different SSID programming model than Compaq. 835 + * Intel uses a different SSID programming model than Compaq. 836 836 * For Intel, each SSID bit identifies a PHP capability. 837 837 * Also Intel HPC's may have RID=0. 838 838 */ ··· 1087 1087 if (rc) { 1088 1088 goto err_free_bus; 1089 1089 } 1090 - 1090 + 1091 1091 dbg("pdev = %p\n", pdev); 1092 1092 dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0)); 1093 1093 dbg("pci resource len %llx\n", (unsigned long long)pci_resource_len(pdev, 0)); ··· 1182 1182 __func__, rc); 1183 1183 goto err_iounmap; 1184 1184 } 1185 - 1185 + 1186 1186 /* Mask all general input interrupts */ 1187 1187 writel(0xFFFFFFFFL, ctrl->hpc_reg + INT_MASK); 1188 1188 ··· 1291 1291 return rc; 1292 1292 } 1293 1293 1294 - 1295 1294 static int one_time_init(void) 1296 1295 { 1297 1296 int loop; ··· 1327 1328 retval = -EIO; 1328 1329 goto error; 1329 1330 } 1330 - 1331 + 1331 1332 /* Now, map the int15 entry point if we are on compaq specific hardware */ 1332 1333 compaq_nvram_init(cpqhp_rom_start); 1333 - 1334 + 1334 1335 /* Map smbios table entry point structure */ 1335 1336 smbios_table = detect_SMBIOS_pointer(cpqhp_rom_start, 1336 1337 cpqhp_rom_start + ROM_PHY_LEN); ··· 1360 1361 return retval; 1361 1362 } 1362 1363 1363 - 1364 1364 static void __exit unload_cpqphpd(void) 1365 1365 { 1366 1366 struct pci_func *next; ··· 1379 1381 if (ctrl->hpc_reg) { 1380 1382 u16 misc; 1381 1383 rc = read_slot_enable (ctrl); 1382 - 1384 + 1383 1385 writeb(0, ctrl->hpc_reg + SLOT_SERR); 1384 1386 writel(0xFFFFFFC0L | ~rc, ctrl->hpc_reg + INT_MASK); 1385 - 1387 + 1386 1388 misc = readw(ctrl->hpc_reg + MISC); 1387 1389 misc &= 0xFFFD; 1388 1390 writew(misc, ctrl->hpc_reg + MISC); ··· 1473 1475 iounmap(smbios_start); 1474 1476 } 1475 1477 1476 - 1477 - 1478 1478 static struct pci_device_id hpcd_pci_tbl[] = { 1479 1479 { 1480 1480 /* handle any PCI Hotplug controller */ 1481 1481 .class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00), 1482 1482 .class_mask = ~0, 1483 - 1483 + 1484 1484 /* no matter who makes it */ 1485 1485 .vendor = PCI_ANY_ID, 1486 1486 .device = PCI_ANY_ID, 1487 1487 .subvendor = PCI_ANY_ID, 1488 1488 .subdevice = PCI_ANY_ID, 1489 - 1489 + 1490 1490 }, { /* end: all zeroes */ } 1491 1491 }; 1492 1492 1493 1493 MODULE_DEVICE_TABLE(pci, hpcd_pci_tbl); 1494 - 1495 - 1496 1494 1497 1495 static struct pci_driver cpqhpc_driver = { 1498 1496 .name = "compaq_pci_hotplug", ··· 1496 1502 .probe = cpqhpc_probe, 1497 1503 /* remove: cpqhpc_remove_one, */ 1498 1504 }; 1499 - 1500 - 1501 1505 1502 1506 static int __init cpqhpc_init(void) 1503 1507 { ··· 1510 1518 return result; 1511 1519 } 1512 1520 1513 - 1514 1521 static void __exit cpqhpc_cleanup(void) 1515 1522 { 1516 1523 dbg("unload_cpqphpd()\n"); ··· 1520 1529 cpqhp_shutdown_debugfs(); 1521 1530 } 1522 1531 1523 - 1524 1532 module_init(cpqhpc_init); 1525 1533 module_exit(cpqhpc_cleanup); 1526 - 1527 -
+43 -43
drivers/pci/hotplug/cpqphp_ctrl.c
··· 642 642 return NULL; 643 643 644 644 for (max = *head; max; max = max->next) { 645 - /* If not big enough we could probably just bail, 645 + /* If not big enough we could probably just bail, 646 646 * instead we'll continue to the next. */ 647 647 if (max->length < size) 648 648 continue; ··· 886 886 u32 Diff; 887 887 u32 temp_dword; 888 888 889 - 889 + 890 890 misc = readw(ctrl->hpc_reg + MISC); 891 891 /*************************************** 892 892 * Check to see if it was our interrupt ··· 1130 1130 u8 slot_power = readb(ctrl->hpc_reg + SLOT_POWER); 1131 1131 u16 reg16; 1132 1132 u32 leds = readl(ctrl->hpc_reg + LED_CONTROL); 1133 - 1133 + 1134 1134 if (ctrl->speed == adapter_speed) 1135 1135 return 0; 1136 - 1136 + 1137 1137 /* We don't allow freq/mode changes if we find another adapter running 1138 1138 * in another slot on this controller */ 1139 1139 for(slot = ctrl->slot; slot; slot = slot->next) { 1140 - if (slot->device == (hp_slot + ctrl->slot_device_offset)) 1140 + if (slot->device == (hp_slot + ctrl->slot_device_offset)) 1141 1141 continue; 1142 1142 if (!slot->hotplug_slot || !slot->hotplug_slot->info) 1143 1143 continue; 1144 - if (slot->hotplug_slot->info->adapter_status == 0) 1144 + if (slot->hotplug_slot->info->adapter_status == 0) 1145 1145 continue; 1146 1146 /* If another adapter is running on the same segment but at a 1147 1147 * lower speed/mode, we allow the new adapter to function at 1148 1148 * this rate if supported */ 1149 - if (ctrl->speed < adapter_speed) 1149 + if (ctrl->speed < adapter_speed) 1150 1150 return 0; 1151 1151 1152 1152 return 1; 1153 1153 } 1154 - 1154 + 1155 1155 /* If the controller doesn't support freq/mode changes and the 1156 1156 * controller is running at a higher mode, we bail */ 1157 1157 if ((ctrl->speed > adapter_speed) && (!ctrl->pcix_speed_capability)) 1158 1158 return 1; 1159 - 1159 + 1160 1160 /* But we allow the adapter to run at a lower rate if possible */ 1161 1161 if ((ctrl->speed < adapter_speed) && (!ctrl->pcix_speed_capability)) 1162 1162 return 0; ··· 1171 1171 1172 1172 writel(0x0L, ctrl->hpc_reg + LED_CONTROL); 1173 1173 writeb(0x00, ctrl->hpc_reg + SLOT_ENABLE); 1174 - 1175 - set_SOGO(ctrl); 1174 + 1175 + set_SOGO(ctrl); 1176 1176 wait_for_ctrl_irq(ctrl); 1177 - 1177 + 1178 1178 if (adapter_speed != PCI_SPEED_133MHz_PCIX) 1179 1179 reg = 0xF5; 1180 1180 else 1181 - reg = 0xF4; 1181 + reg = 0xF4; 1182 1182 pci_write_config_byte(ctrl->pci_dev, 0x41, reg); 1183 - 1183 + 1184 1184 reg16 = readw(ctrl->hpc_reg + NEXT_CURR_FREQ); 1185 1185 reg16 &= ~0x000F; 1186 1186 switch(adapter_speed) { 1187 - case(PCI_SPEED_133MHz_PCIX): 1187 + case(PCI_SPEED_133MHz_PCIX): 1188 1188 reg = 0x75; 1189 - reg16 |= 0xB; 1189 + reg16 |= 0xB; 1190 1190 break; 1191 1191 case(PCI_SPEED_100MHz_PCIX): 1192 1192 reg = 0x74; ··· 1203 1203 default: /* 33MHz PCI 2.2 */ 1204 1204 reg = 0x71; 1205 1205 break; 1206 - 1206 + 1207 1207 } 1208 1208 reg16 |= 0xB << 12; 1209 1209 writew(reg16, ctrl->hpc_reg + NEXT_CURR_FREQ); 1210 - 1211 - mdelay(5); 1212 - 1210 + 1211 + mdelay(5); 1212 + 1213 1213 /* Reenable interrupts */ 1214 1214 writel(0, ctrl->hpc_reg + INT_MASK); 1215 1215 1216 - pci_write_config_byte(ctrl->pci_dev, 0x41, reg); 1217 - 1216 + pci_write_config_byte(ctrl->pci_dev, 0x41, reg); 1217 + 1218 1218 /* Restart state machine */ 1219 1219 reg = ~0xF; 1220 1220 pci_read_config_byte(ctrl->pci_dev, 0x43, &reg); 1221 1221 pci_write_config_byte(ctrl->pci_dev, 0x43, reg); 1222 - 1222 + 1223 1223 /* Only if mode change...*/ 1224 1224 if (((ctrl->speed == PCI_SPEED_66MHz) && (adapter_speed == PCI_SPEED_66MHz_PCIX)) || 1225 1225 ((ctrl->speed == PCI_SPEED_66MHz_PCIX) && (adapter_speed == PCI_SPEED_66MHz))) 1226 1226 set_SOGO(ctrl); 1227 - 1227 + 1228 1228 wait_for_ctrl_irq(ctrl); 1229 1229 mdelay(1100); 1230 - 1230 + 1231 1231 /* Restore LED/Slot state */ 1232 1232 writel(leds, ctrl->hpc_reg + LED_CONTROL); 1233 1233 writeb(slot_power, ctrl->hpc_reg + SLOT_ENABLE); 1234 - 1234 + 1235 1235 set_SOGO(ctrl); 1236 1236 wait_for_ctrl_irq(ctrl); 1237 1237 1238 1238 ctrl->speed = adapter_speed; 1239 1239 slot = cpqhp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 1240 1240 1241 - info("Successfully changed frequency/mode for adapter in slot %d\n", 1241 + info("Successfully changed frequency/mode for adapter in slot %d\n", 1242 1242 slot->number); 1243 1243 return 0; 1244 1244 } 1245 1245 1246 - /* the following routines constitute the bulk of the 1246 + /* the following routines constitute the bulk of the 1247 1247 hotplug controller logic 1248 1248 */ 1249 1249 ··· 1299 1299 1300 1300 /* Wait for SOBS to be unset */ 1301 1301 wait_for_ctrl_irq (ctrl); 1302 - 1302 + 1303 1303 adapter_speed = get_adapter_speed(ctrl, hp_slot); 1304 1304 if (ctrl->speed != adapter_speed) 1305 1305 if (set_controller_speed(ctrl, adapter_speed, hp_slot)) ··· 1443 1443 1444 1444 /* Wait for SOBS to be unset */ 1445 1445 wait_for_ctrl_irq (ctrl); 1446 - 1446 + 1447 1447 adapter_speed = get_adapter_speed(ctrl, hp_slot); 1448 1448 if (ctrl->speed != adapter_speed) 1449 1449 if (set_controller_speed(ctrl, adapter_speed, hp_slot)) 1450 1450 rc = WRONG_BUS_FREQUENCY; 1451 - 1451 + 1452 1452 /* turn off board without attaching to the bus */ 1453 1453 disable_slot_power (ctrl, hp_slot); 1454 1454 ··· 1461 1461 1462 1462 if (rc) 1463 1463 return rc; 1464 - 1464 + 1465 1465 p_slot = cpqhp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 1466 1466 1467 1467 /* turn on board and blink green LED */ ··· 1859 1859 info(msg_button_on, p_slot->number); 1860 1860 } 1861 1861 mutex_lock(&ctrl->crit_sect); 1862 - 1862 + 1863 1863 dbg("blink green LED and turn off amber\n"); 1864 - 1864 + 1865 1865 amber_LED_off (ctrl, hp_slot); 1866 1866 green_LED_blink (ctrl, hp_slot); 1867 - 1867 + 1868 1868 set_SOGO(ctrl); 1869 1869 1870 1870 /* Wait for SOBS to be unset */ ··· 1958 1958 if (cpqhp_process_SI(ctrl, func) != 0) { 1959 1959 amber_LED_on(ctrl, hp_slot); 1960 1960 green_LED_off(ctrl, hp_slot); 1961 - 1961 + 1962 1962 set_SOGO(ctrl); 1963 1963 1964 1964 /* Wait for SOBS to be unset */ ··· 2079 2079 struct pci_bus *pci_bus = ctrl->pci_bus; 2080 2080 int physical_slot=0; 2081 2081 2082 - device = func->device; 2082 + device = func->device; 2083 2083 func = cpqhp_slot_find(ctrl->bus, device, index++); 2084 2084 p_slot = cpqhp_find_slot(ctrl, device); 2085 2085 if (p_slot) { ··· 2216 2216 long_delay((3*HZ)/10); 2217 2217 work_LED = work_LED >> 16; 2218 2218 writel(work_LED, ctrl->hpc_reg + LED_CONTROL); 2219 - 2219 + 2220 2220 set_SOGO(ctrl); 2221 2221 2222 2222 /* Wait for SOGO interrupt */ ··· 2339 2339 2340 2340 2341 2341 /* 2342 - Configuration logic that involves the hotplug data structures and 2342 + Configuration logic that involves the hotplug data structures and 2343 2343 their bookkeeping 2344 2344 */ 2345 2345 ··· 2917 2917 } /* End of base register loop */ 2918 2918 if (cpqhp_legacy_mode) { 2919 2919 /* Figure out which interrupt pin this function uses */ 2920 - rc = pci_bus_read_config_byte (pci_bus, devfn, 2920 + rc = pci_bus_read_config_byte (pci_bus, devfn, 2921 2921 PCI_INTERRUPT_PIN, &temp_byte); 2922 2922 2923 2923 /* If this function needs an interrupt and we are behind 2924 2924 * a bridge and the pin is tied to something that's 2925 2925 * alread mapped, set this one the same */ 2926 - if (temp_byte && resources->irqs && 2927 - (resources->irqs->valid_INT & 2926 + if (temp_byte && resources->irqs && 2927 + (resources->irqs->valid_INT & 2928 2928 (0x01 << ((temp_byte + resources->irqs->barber_pole - 1) & 0x03)))) { 2929 2929 /* We have to share with something already set up */ 2930 - IRQ = resources->irqs->interrupt[(temp_byte + 2930 + IRQ = resources->irqs->interrupt[(temp_byte + 2931 2931 resources->irqs->barber_pole - 1) & 0x03]; 2932 2932 } else { 2933 2933 /* Program IRQ based on card type */
+9 -9
drivers/pci/hotplug/cpqphp_nvram.c
··· 113 113 114 114 if ((*used + 1) > *avail) 115 115 return(1); 116 - 116 + 117 117 *((u8*)*p_buffer) = value; 118 118 tByte = (u8**)p_buffer; 119 119 (*tByte)++; ··· 170 170 unsigned long flags; 171 171 int op = operation; 172 172 int ret_val; 173 - 173 + 174 174 if (!compaq_int15_entry_point) 175 175 return -ENODEV; 176 - 176 + 177 177 spin_lock_irqsave(&int15_lock, flags); 178 178 __asm__ ( 179 179 "xorl %%ebx,%%ebx\n" \ ··· 187 187 "D" (buffer), "m" (compaq_int15_entry_point) 188 188 : "%ebx", "%edx"); 189 189 spin_unlock_irqrestore(&int15_lock, flags); 190 - 190 + 191 191 return((ret_val & 0xFF00) >> 8); 192 192 } 193 193 ··· 263 263 p_EV_header = (struct ev_hrt_header *) pFill; 264 264 265 265 ctrl = cpqhp_ctrl_list; 266 - 266 + 267 267 // The revision of this structure 268 268 rc = add_byte( &pFill, 1 + ctrl->push_flag, &usedbytes, &available); 269 269 if (rc) ··· 401 401 402 402 ctrl = ctrl->next; 403 403 } 404 - 404 + 405 405 p_EV_header->num_of_ctrl = numCtrl; 406 406 407 407 // Now store the EV ··· 479 479 function = p_ev_ctrl->function; 480 480 481 481 while ((bus != ctrl->bus) || 482 - (device != PCI_SLOT(ctrl->pci_dev->devfn)) || 482 + (device != PCI_SLOT(ctrl->pci_dev->devfn)) || 483 483 (function != PCI_FUNC(ctrl->pci_dev->devfn))) { 484 484 nummem = p_ev_ctrl->mem_avail; 485 485 numpmem = p_ev_ctrl->p_mem_avail; ··· 640 640 if (rc) 641 641 return(rc); 642 642 } else { 643 - if ((evbuffer[0] != 0) && (!ctrl->push_flag)) 643 + if ((evbuffer[0] != 0) && (!ctrl->push_flag)) 644 644 return 1; 645 645 } 646 646 647 647 return 0; 648 648 } 649 649 650 - 650 + 651 651 int compaq_nvram_store (void __iomem *rom_start) 652 652 { 653 653 int rc = 1;
+7 -7
drivers/pci/hotplug/cpqphp_pci.c
··· 82 82 } 83 83 84 84 85 - int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) 85 + int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func) 86 86 { 87 87 unsigned char bus; 88 88 struct pci_bus *child; ··· 116 116 } 117 117 118 118 119 - int cpqhp_unconfigure_device(struct pci_func* func) 119 + int cpqhp_unconfigure_device(struct pci_func* func) 120 120 { 121 121 int j; 122 - 122 + 123 123 dbg("%s: bus/dev/func = %x/%x/%x\n", __func__, func->bus, func->device, func->function); 124 124 125 125 for (j=0; j<8 ; j++) { ··· 195 195 196 196 197 197 /* 198 - * WTF??? This function isn't in the code, yet a function calls it, but the 199 - * compiler optimizes it away? strange. Here as a placeholder to keep the 198 + * WTF??? This function isn't in the code, yet a function calls it, but the 199 + * compiler optimizes it away? strange. Here as a placeholder to keep the 200 200 * compiler happy. 201 201 */ 202 202 static int PCI_ScanBusNonBridge (u8 bus, u8 device) ··· 398 398 399 399 index = 0; 400 400 new_slot = cpqhp_slot_find(busnumber, device, index++); 401 - while (new_slot && 401 + while (new_slot && 402 402 (new_slot->function != (u8) function)) 403 403 new_slot = cpqhp_slot_find(busnumber, device, index++); 404 404 ··· 1168 1168 * this function is for hot plug ADD! 1169 1169 * 1170 1170 * returns 0 if success 1171 - */ 1171 + */ 1172 1172 int cpqhp_find_available_resources(struct controller *ctrl, void __iomem *rom_start) 1173 1173 { 1174 1174 u8 temp;