Skip to content

Commit 861fefb

Browse files
Alex Chiangjbarnes993
authored andcommitted
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>
1 parent d09ee96 commit 861fefb

5 files changed

Lines changed: 110 additions & 122 deletions

File tree

‎drivers/pci/hotplug/cpqphp.h‎

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -150,25 +150,25 @@ struct ctrl_reg { /* offset */
150150

151151
/* offsets to the controller registers based on the above structure layout */
152152
enum ctrl_offsets {
153-
SLOT_RST = offsetof(struct ctrl_reg, slot_RST),
153+
SLOT_RST = offsetof(struct ctrl_reg, slot_RST),
154154
SLOT_ENABLE = offsetof(struct ctrl_reg, slot_enable),
155155
MISC = offsetof(struct ctrl_reg, misc),
156156
LED_CONTROL = offsetof(struct ctrl_reg, led_control),
157157
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),
160160
CTRL_RESERVED1 = offsetof(struct ctrl_reg, reserved1),
161161
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),
164164
CTRL_RESERVED3 = offsetof(struct ctrl_reg, reserved3),
165165
CTRL_RESERVED4 = offsetof(struct ctrl_reg, reserved4),
166166
CTRL_RESERVED5 = offsetof(struct ctrl_reg, reserved5),
167167
CTRL_RESERVED6 = offsetof(struct ctrl_reg, reserved6),
168168
CTRL_RESERVED7 = offsetof(struct ctrl_reg, reserved7),
169169
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),
172172
CTRL_RESERVED10 = offsetof(struct ctrl_reg, reserved10),
173173
CTRL_RESERVED11 = offsetof(struct ctrl_reg, reserved11),
174174
SLOT_SERR = offsetof(struct ctrl_reg, slot_SERR),
@@ -220,15 +220,15 @@ struct slot_rt {
220220
/* offsets to the hotplug slot resource table registers based on the above structure layout */
221221
enum slot_rt_offsets {
222222
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),
232232
};
233233

234234
struct pci_func {
@@ -471,7 +471,7 @@ static inline void return_resource(struct pci_resource **head, struct pci_resour
471471
static inline void set_SOGO(struct controller *ctrl)
472472
{
473473
u16 misc;
474-
474+
475475
misc = readw(ctrl->hpc_reg + MISC);
476476
misc = (misc | 0x0001) & 0xFFFB;
477477
writew(misc, ctrl->hpc_reg + MISC);
@@ -481,7 +481,7 @@ static inline void set_SOGO(struct controller *ctrl)
481481
static inline void amber_LED_on(struct controller *ctrl, u8 slot)
482482
{
483483
u32 led_control;
484-
484+
485485
led_control = readl(ctrl->hpc_reg + LED_CONTROL);
486486
led_control |= (0x01010000L << slot);
487487
writel(led_control, ctrl->hpc_reg + LED_CONTROL);
@@ -491,7 +491,7 @@ static inline void amber_LED_on(struct controller *ctrl, u8 slot)
491491
static inline void amber_LED_off(struct controller *ctrl, u8 slot)
492492
{
493493
u32 led_control;
494-
494+
495495
led_control = readl(ctrl->hpc_reg + LED_CONTROL);
496496
led_control &= ~(0x01010000L << slot);
497497
writel(led_control, ctrl->hpc_reg + LED_CONTROL);
@@ -504,15 +504,15 @@ static inline int read_amber_LED(struct controller *ctrl, u8 slot)
504504

505505
led_control = readl(ctrl->hpc_reg + LED_CONTROL);
506506
led_control &= (0x01010000L << slot);
507-
507+
508508
return led_control ? 1 : 0;
509509
}
510510

511511

512512
static inline void green_LED_on(struct controller *ctrl, u8 slot)
513513
{
514514
u32 led_control;
515-
515+
516516
led_control = readl(ctrl->hpc_reg + LED_CONTROL);
517517
led_control |= 0x0101L << slot;
518518
writel(led_control, ctrl->hpc_reg + LED_CONTROL);
@@ -521,7 +521,7 @@ static inline void green_LED_on(struct controller *ctrl, u8 slot)
521521
static inline void green_LED_off(struct controller *ctrl, u8 slot)
522522
{
523523
u32 led_control;
524-
524+
525525
led_control = readl(ctrl->hpc_reg + LED_CONTROL);
526526
led_control &= ~(0x0101L << slot);
527527
writel(led_control, ctrl->hpc_reg + LED_CONTROL);
@@ -531,7 +531,7 @@ static inline void green_LED_off(struct controller *ctrl, u8 slot)
531531
static inline void green_LED_blink(struct controller *ctrl, u8 slot)
532532
{
533533
u32 led_control;
534-
534+
535535
led_control = readl(ctrl->hpc_reg + LED_CONTROL);
536536
led_control &= ~(0x0101L << slot);
537537
led_control |= (0x0001L << slot);
@@ -586,11 +586,11 @@ static inline u8 read_slot_enable(struct controller *ctrl)
586586
static inline u8 get_controller_speed(struct controller *ctrl)
587587
{
588588
u8 curr_freq;
589-
u16 misc;
590-
589+
u16 misc;
590+
591591
if (ctrl->pcix_support) {
592592
curr_freq = readb(ctrl->hpc_reg + NEXT_CURR_FREQ);
593-
if ((curr_freq & 0xB0) == 0xB0)
593+
if ((curr_freq & 0xB0) == 0xB0)
594594
return PCI_SPEED_133MHz_PCIX;
595595
if ((curr_freq & 0xA0) == 0xA0)
596596
return PCI_SPEED_100MHz_PCIX;
@@ -602,10 +602,10 @@ static inline u8 get_controller_speed(struct controller *ctrl)
602602
return PCI_SPEED_33MHz;
603603
}
604604

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;
607607
}
608-
608+
609609

610610
/*
611611
* get_adapter_speed - find the max supported frequency/mode of adapter.

‎drivers/pci/hotplug/cpqphp_core.c‎

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Send feedback to <greg@kroah.com>
2626
*
2727
* Jan 12, 2003 - Added 66/100/133MHz PCI-X support,
28-
* Torben Mathiasen <torben.mathiasen@hp.com>
28+
* Torben Mathiasen <torben.mathiasen@hp.com>
2929
*
3030
*/
3131

@@ -100,8 +100,8 @@ static struct hotplug_slot_ops cpqphp_hotplug_slot_ops = {
100100
.get_attention_status = get_attention_status,
101101
.get_latch_status = get_latch_status,
102102
.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,
105105
};
106106

107107

@@ -144,7 +144,7 @@ static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *e
144144
break;
145145
}
146146
}
147-
147+
148148
if (!status)
149149
fp = NULL;
150150

@@ -292,15 +292,15 @@ static void __iomem *get_SMBIOS_entry(void __iomem *smbios_start,
292292
if (!smbios_table)
293293
return NULL;
294294

295-
if (!previous) {
295+
if (!previous) {
296296
previous = smbios_start;
297297
} else {
298298
previous = get_subsequent_smbios_entry(smbios_start,
299299
smbios_table, previous);
300300
}
301301

302302
while (previous) {
303-
if (readb(previous + SMBIOS_GENERIC_TYPE) != type) {
303+
if (readb(previous + SMBIOS_GENERIC_TYPE) != type) {
304304
previous = get_subsequent_smbios_entry(smbios_start,
305305
smbios_table, previous);
306306
} else {
@@ -426,7 +426,7 @@ static int ctrl_slot_setup(struct controller *ctrl,
426426
cpq_get_latch_status(ctrl, slot);
427427
hotplug_slot_info->adapter_status =
428428
get_presence_status(ctrl, slot);
429-
429+
430430
dbg("registering bus %d, dev %d, number %d, "
431431
"ctrl->slot_device_offset %d, slot %d\n",
432432
slot->bus, slot->device,
@@ -440,7 +440,7 @@ static int ctrl_slot_setup(struct controller *ctrl,
440440
err("pci_hp_register failed with error %d\n", result);
441441
goto error_info;
442442
}
443-
443+
444444
slot->next = ctrl->slot;
445445
ctrl->slot = slot;
446446

@@ -563,9 +563,9 @@ get_slot_mapping(struct pci_bus *bus, u8 bus_num, u8 dev_num, u8 *slot)
563563

564564
}
565565

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
569569
// slot number for the bridge.
570570
if (bridgeSlot != 0xFF) {
571571
*slot = bridgeSlot;
@@ -719,7 +719,7 @@ static int hardware_test(struct hotplug_slot *hotplug_slot, u32 value)
719719

720720
dbg("%s - physical_slot = %s\n", __func__, slot_name(slot));
721721

722-
return cpqhp_hardware_test(ctrl, value);
722+
return cpqhp_hardware_test(ctrl, value);
723723
}
724724

725725

@@ -738,7 +738,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
738738
{
739739
struct slot *slot = hotplug_slot->private;
740740
struct controller *ctrl = slot->ctrl;
741-
741+
742742
dbg("%s - physical_slot = %s\n", __func__, slot_name(slot));
743743

744744
*value = cpq_get_attention_status(ctrl, slot);
@@ -832,7 +832,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
832832
}
833833

834834
/* 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.
836836
* For Intel, each SSID bit identifies a PHP capability.
837837
* Also Intel HPC's may have RID=0.
838838
*/
@@ -1087,7 +1087,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
10871087
if (rc) {
10881088
goto err_free_bus;
10891089
}
1090-
1090+
10911091
dbg("pdev = %p\n", pdev);
10921092
dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0));
10931093
dbg("pci resource len %llx\n", (unsigned long long)pci_resource_len(pdev, 0));
@@ -1182,7 +1182,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11821182
__func__, rc);
11831183
goto err_iounmap;
11841184
}
1185-
1185+
11861186
/* Mask all general input interrupts */
11871187
writel(0xFFFFFFFFL, ctrl->hpc_reg + INT_MASK);
11881188

@@ -1291,7 +1291,6 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
12911291
return rc;
12921292
}
12931293

1294-
12951294
static int one_time_init(void)
12961295
{
12971296
int loop;
@@ -1328,10 +1327,10 @@ static int one_time_init(void)
13281327
retval = -EIO;
13291328
goto error;
13301329
}
1331-
1330+
13321331
/* Now, map the int15 entry point if we are on compaq specific hardware */
13331332
compaq_nvram_init(cpqhp_rom_start);
1334-
1333+
13351334
/* Map smbios table entry point structure */
13361335
smbios_table = detect_SMBIOS_pointer(cpqhp_rom_start,
13371336
cpqhp_rom_start + ROM_PHY_LEN);
@@ -1361,7 +1360,6 @@ static int one_time_init(void)
13611360
return retval;
13621361
}
13631362

1364-
13651363
static void __exit unload_cpqphpd(void)
13661364
{
13671365
struct pci_func *next;
@@ -1381,10 +1379,10 @@ static void __exit unload_cpqphpd(void)
13811379
if (ctrl->hpc_reg) {
13821380
u16 misc;
13831381
rc = read_slot_enable (ctrl);
1384-
1382+
13851383
writeb(0, ctrl->hpc_reg + SLOT_SERR);
13861384
writel(0xFFFFFFC0L | ~rc, ctrl->hpc_reg + INT_MASK);
1387-
1385+
13881386
misc = readw(ctrl->hpc_reg + MISC);
13891387
misc &= 0xFFFD;
13901388
writew(misc, ctrl->hpc_reg + MISC);
@@ -1475,36 +1473,30 @@ static void __exit unload_cpqphpd(void)
14751473
iounmap(smbios_start);
14761474
}
14771475

1478-
1479-
14801476
static struct pci_device_id hpcd_pci_tbl[] = {
14811477
{
14821478
/* handle any PCI Hotplug controller */
14831479
.class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00),
14841480
.class_mask = ~0,
1485-
1481+
14861482
/* no matter who makes it */
14871483
.vendor = PCI_ANY_ID,
14881484
.device = PCI_ANY_ID,
14891485
.subvendor = PCI_ANY_ID,
14901486
.subdevice = PCI_ANY_ID,
1491-
1487+
14921488
}, { /* end: all zeroes */ }
14931489
};
14941490

14951491
MODULE_DEVICE_TABLE(pci, hpcd_pci_tbl);
14961492

1497-
1498-
14991493
static struct pci_driver cpqhpc_driver = {
15001494
.name = "compaq_pci_hotplug",
15011495
.id_table = hpcd_pci_tbl,
15021496
.probe = cpqhpc_probe,
15031497
/* remove: cpqhpc_remove_one, */
15041498
};
15051499

1506-
1507-
15081500
static int __init cpqhpc_init(void)
15091501
{
15101502
int result;
@@ -1518,7 +1510,6 @@ static int __init cpqhpc_init(void)
15181510
return result;
15191511
}
15201512

1521-
15221513
static void __exit cpqhpc_cleanup(void)
15231514
{
15241515
dbg("unload_cpqphpd()\n");
@@ -1529,8 +1520,5 @@ static void __exit cpqhpc_cleanup(void)
15291520
cpqhp_shutdown_debugfs();
15301521
}
15311522

1532-
15331523
module_init(cpqhpc_init);
15341524
module_exit(cpqhpc_cleanup);
1535-
1536-

0 commit comments

Comments
 (0)