Commit 9f593e30 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Greg Kroah-Hartman

shpchp: delete trailing whitespace

This patch deletes trailing white space in SHPCHP driver. This has no
functional change.
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1555b33d
...@@ -106,7 +106,7 @@ struct controller { ...@@ -106,7 +106,7 @@ struct controller {
}; };
/* Define AMD SHPC ID */ /* Define AMD SHPC ID */
#define PCI_DEVICE_ID_AMD_GOLAM_7450 0x7450 #define PCI_DEVICE_ID_AMD_GOLAM_7450 0x7450
#define PCI_DEVICE_ID_AMD_POGO_7458 0x7458 #define PCI_DEVICE_ID_AMD_POGO_7458 0x7458
/* AMD PCIX bridge registers */ /* AMD PCIX bridge registers */
...@@ -221,7 +221,7 @@ enum ctrl_offsets { ...@@ -221,7 +221,7 @@ enum ctrl_offsets {
}; };
static inline struct slot *get_slot(struct hotplug_slot *hotplug_slot) static inline struct slot *get_slot(struct hotplug_slot *hotplug_slot)
{ {
return hotplug_slot->private; return hotplug_slot->private;
} }
......
...@@ -64,7 +64,7 @@ u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl) ...@@ -64,7 +64,7 @@ u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl)
/* Attention Button Change */ /* Attention Button Change */
dbg("shpchp: Attention button interrupt received.\n"); dbg("shpchp: Attention button interrupt received.\n");
p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save));
...@@ -128,7 +128,7 @@ u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl) ...@@ -128,7 +128,7 @@ u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl)
p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
/* /*
* Save the presence state * Save the presence state
*/ */
p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save));
...@@ -184,12 +184,12 @@ u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl) ...@@ -184,12 +184,12 @@ u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl)
return 1; return 1;
} }
/* The following routines constitute the bulk of the /* The following routines constitute the bulk of the
hotplug controller logic hotplug controller logic
*/ */
static int change_bus_speed(struct controller *ctrl, struct slot *p_slot, static int change_bus_speed(struct controller *ctrl, struct slot *p_slot,
enum pci_bus_speed speed) enum pci_bus_speed speed)
{ {
int rc = 0; int rc = 0;
dbg("%s: change to speed %d\n", __FUNCTION__, speed); dbg("%s: change to speed %d\n", __FUNCTION__, speed);
...@@ -204,7 +204,7 @@ static int change_bus_speed(struct controller *ctrl, struct slot *p_slot, ...@@ -204,7 +204,7 @@ static int change_bus_speed(struct controller *ctrl, struct slot *p_slot,
static int fix_bus_speed(struct controller *ctrl, struct slot *pslot, static int fix_bus_speed(struct controller *ctrl, struct slot *pslot,
u8 flag, enum pci_bus_speed asp, enum pci_bus_speed bsp, u8 flag, enum pci_bus_speed asp, enum pci_bus_speed bsp,
enum pci_bus_speed msp) enum pci_bus_speed msp)
{ {
int rc = 0; int rc = 0;
/* /*
...@@ -257,23 +257,23 @@ static int board_added(struct slot *p_slot) ...@@ -257,23 +257,23 @@ static int board_added(struct slot *p_slot)
err("%s: Failed to power on slot\n", __FUNCTION__); err("%s: Failed to power on slot\n", __FUNCTION__);
return -1; return -1;
} }
if ((ctrl->pci_dev->vendor == 0x8086) && (ctrl->pci_dev->device == 0x0332)) { if ((ctrl->pci_dev->vendor == 0x8086) && (ctrl->pci_dev->device == 0x0332)) {
if (slots_not_empty) if (slots_not_empty)
return WRONG_BUS_FREQUENCY; return WRONG_BUS_FREQUENCY;
if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, PCI_SPEED_33MHz))) { if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, PCI_SPEED_33MHz))) {
err("%s: Issue of set bus speed mode command failed\n", __FUNCTION__); err("%s: Issue of set bus speed mode command failed\n", __FUNCTION__);
return WRONG_BUS_FREQUENCY; return WRONG_BUS_FREQUENCY;
} }
/* turn on board, blink green LED, turn off Amber LED */ /* turn on board, blink green LED, turn off Amber LED */
if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) {
err("%s: Issue of Slot Enable command failed\n", __FUNCTION__); err("%s: Issue of Slot Enable command failed\n", __FUNCTION__);
return rc; return rc;
} }
} }
rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &asp); rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &asp);
if (rc) { if (rc) {
err("%s: Can't get adapter speed or bus mode mismatch\n", err("%s: Can't get adapter speed or bus mode mismatch\n",
...@@ -378,7 +378,7 @@ static int remove_board(struct slot *p_slot) ...@@ -378,7 +378,7 @@ static int remove_board(struct slot *p_slot)
err("%s: Issue of Slot Disable command failed\n", __FUNCTION__); err("%s: Issue of Slot Disable command failed\n", __FUNCTION__);
return rc; return rc;
} }
rc = p_slot->hpc_ops->set_attention_status(p_slot, 0); rc = p_slot->hpc_ops->set_attention_status(p_slot, 0);
if (rc) { if (rc) {
err("%s: Issue of Set Attention command failed\n", __FUNCTION__); err("%s: Issue of Set Attention command failed\n", __FUNCTION__);
......
...@@ -329,9 +329,9 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) ...@@ -329,9 +329,9 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd)
++t_slot; ++t_slot;
temp_word = (t_slot << 8) | (cmd & 0xFF); temp_word = (t_slot << 8) | (cmd & 0xFF);
dbg("%s: t_slot %x cmd %x\n", __FUNCTION__, t_slot, cmd); dbg("%s: t_slot %x cmd %x\n", __FUNCTION__, t_slot, cmd);
/* To make sure the Controller Busy bit is 0 before we send out the /* To make sure the Controller Busy bit is 0 before we send out the
* command. * command.
*/ */
shpc_writew(ctrl, CMD, temp_word); shpc_writew(ctrl, CMD, temp_word);
...@@ -357,7 +357,7 @@ static int hpc_check_cmd_status(struct controller *ctrl) ...@@ -357,7 +357,7 @@ static int hpc_check_cmd_status(struct controller *ctrl)
{ {
int retval = 0; int retval = 0;
u16 cmd_status = shpc_readw(ctrl, CMD_STATUS) & 0x000F; u16 cmd_status = shpc_readw(ctrl, CMD_STATUS) & 0x000F;
switch (cmd_status >> 1) { switch (cmd_status >> 1) {
case 0: case 0:
retval = 0; retval = 0;
...@@ -544,7 +544,7 @@ static int hpc_set_attention_status(struct slot *slot, u8 value) ...@@ -544,7 +544,7 @@ static int hpc_set_attention_status(struct slot *slot, u8 value)
u8 slot_cmd = 0; u8 slot_cmd = 0;
switch (value) { switch (value) {
case 0 : case 0 :
slot_cmd = SET_ATTN_OFF; /* OFF */ slot_cmd = SET_ATTN_OFF; /* OFF */
break; break;
case 1: case 1:
...@@ -735,7 +735,7 @@ static irqreturn_t shpc_isr(int irq, void *dev_id) ...@@ -735,7 +735,7 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
if (!intr_loc) if (!intr_loc)
return IRQ_NONE; return IRQ_NONE;
dbg("%s: intr_loc = %x\n",__FUNCTION__, intr_loc); dbg("%s: intr_loc = %x\n",__FUNCTION__, intr_loc);
if(!shpchp_poll_mode) { if(!shpchp_poll_mode) {
/* /*
...@@ -748,12 +748,12 @@ static irqreturn_t shpc_isr(int irq, void *dev_id) ...@@ -748,12 +748,12 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
intr_loc2 = shpc_readl(ctrl, INTR_LOC); intr_loc2 = shpc_readl(ctrl, INTR_LOC);
dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2);
} }
if (intr_loc & CMD_INTR_PENDING) { if (intr_loc & CMD_INTR_PENDING) {
/* /*
* Command Complete Interrupt Pending * Command Complete Interrupt Pending
* RO only - clear by writing 1 to the Command Completion * RO only - clear by writing 1 to the Command Completion
* Detect bit in Controller SERR-INT register * Detect bit in Controller SERR-INT register
*/ */
...@@ -767,7 +767,7 @@ static irqreturn_t shpc_isr(int irq, void *dev_id) ...@@ -767,7 +767,7 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
if (!(intr_loc & ~CMD_INTR_PENDING)) if (!(intr_loc & ~CMD_INTR_PENDING))
goto out; goto out;
for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) {
/* To find out which slot has interrupt pending */ /* To find out which slot has interrupt pending */
if (!(intr_loc & SLOT_INTR_PENDING(hp_slot))) if (!(intr_loc & SLOT_INTR_PENDING(hp_slot)))
continue; continue;
...@@ -799,7 +799,7 @@ static irqreturn_t shpc_isr(int irq, void *dev_id) ...@@ -799,7 +799,7 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
serr_int &= ~(GLOBAL_INTR_MASK | SERR_INTR_RSVDZ_MASK); serr_int &= ~(GLOBAL_INTR_MASK | SERR_INTR_RSVDZ_MASK);
shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -919,7 +919,7 @@ static struct hpc_ops shpchp_hpc_ops = { ...@@ -919,7 +919,7 @@ static struct hpc_ops shpchp_hpc_ops = {
.power_on_slot = hpc_power_on_slot, .power_on_slot = hpc_power_on_slot,
.slot_enable = hpc_slot_enable, .slot_enable = hpc_slot_enable,
.slot_disable = hpc_slot_disable, .slot_disable = hpc_slot_disable,
.set_bus_speed_mode = hpc_set_bus_speed_mode, .set_bus_speed_mode = hpc_set_bus_speed_mode,
.set_attention_status = hpc_set_attention_status, .set_attention_status = hpc_set_attention_status,
.get_power_status = hpc_get_power_status, .get_power_status = hpc_get_power_status,
.get_attention_status = hpc_get_attention_status, .get_attention_status = hpc_get_attention_status,
...@@ -936,7 +936,7 @@ static struct hpc_ops shpchp_hpc_ops = { ...@@ -936,7 +936,7 @@ static struct hpc_ops shpchp_hpc_ops = {
.green_led_on = hpc_set_green_led_on, .green_led_on = hpc_set_green_led_on,
.green_led_off = hpc_set_green_led_off, .green_led_off = hpc_set_green_led_off,
.green_led_blink = hpc_set_green_led_blink, .green_led_blink = hpc_set_green_led_blink,
.release_ctlr = hpc_release_ctlr, .release_ctlr = hpc_release_ctlr,
}; };
...@@ -993,9 +993,9 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) ...@@ -993,9 +993,9 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
ctrl->mmio_size = 0x24 + 0x4 * num_slots; ctrl->mmio_size = 0x24 + 0x4 * num_slots;
} }
info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor, info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor,
pdev->subsystem_device); pdev->subsystem_device);
rc = pci_enable_device(pdev); rc = pci_enable_device(pdev);
if (rc) { if (rc) {
err("%s: pci_enable_device failed\n", __FUNCTION__); err("%s: pci_enable_device failed\n", __FUNCTION__);
...@@ -1057,7 +1057,7 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) ...@@ -1057,7 +1057,7 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
slot_reg &= ~SLOT_REG_RSVDZ_MASK; slot_reg &= ~SLOT_REG_RSVDZ_MASK;
shpc_writel(ctrl, SLOT_REG(hp_slot), slot_reg); shpc_writel(ctrl, SLOT_REG(hp_slot), slot_reg);
} }
if (shpchp_poll_mode) { if (shpchp_poll_mode) {
/* Install interrupt polling timer. Start with 10 sec delay */ /* Install interrupt polling timer. Start with 10 sec delay */
init_timer(&ctrl->poll_timer); init_timer(&ctrl->poll_timer);
...@@ -1069,7 +1069,7 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) ...@@ -1069,7 +1069,7 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
info("Can't get msi for the hotplug controller\n"); info("Can't get msi for the hotplug controller\n");
info("Use INTx for the hotplug controller\n"); info("Use INTx for the hotplug controller\n");
} }
rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED, rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED,
MY_NAME, (void *)ctrl); MY_NAME, (void *)ctrl);
dbg("%s: request_irq %d for hpc%d (returns %d)\n", dbg("%s: request_irq %d for hpc%d (returns %d)\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment