Commit 34e74d4c authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Deepak Saxena

[PATCH] Compaq PCI Hotplug: coding style fixes for cpqphp_ctrl.c

Some coding style fixes I missed last time.
parent 96508247
...@@ -714,7 +714,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz ...@@ -714,7 +714,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
continue; continue;
/* Now take it out of the list */ /* Now take it out of the list */
temp = (struct pci_resource*) *head; temp = *head;
if (temp == max) { if (temp == max) {
*head = max->next; *head = max->next;
} else { } else {
...@@ -726,11 +726,10 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz ...@@ -726,11 +726,10 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
} }
max->next = NULL; max->next = NULL;
return max; break;
} }
/* If we get here, we couldn't find one */ return max;
return NULL;
} }
...@@ -755,10 +754,10 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size) ...@@ -755,10 +754,10 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
if (!(*head)) if (!(*head))
return NULL; return NULL;
if ( cpqhp_resource_sort_and_combine(head) ) if (cpqhp_resource_sort_and_combine(head))
return NULL; return NULL;
if ( sort_by_size(head) ) if (sort_by_size(head))
return NULL; return NULL;
for (node = *head; node; node = node->next) { for (node = *head; node; node = node->next) {
...@@ -1293,7 +1292,7 @@ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_ ...@@ -1293,7 +1292,7 @@ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_
* If board isn't same, turns it back off. * If board isn't same, turns it back off.
* *
*/ */
static u32 board_replaced(struct pci_func * func, struct controller * ctrl) static u32 board_replaced(struct pci_func *func, struct controller *ctrl)
{ {
u8 hp_slot; u8 hp_slot;
u8 temp_byte; u8 temp_byte;
...@@ -1488,7 +1487,7 @@ static u32 board_replaced(struct pci_func * func, struct controller * ctrl) ...@@ -1488,7 +1487,7 @@ static u32 board_replaced(struct pci_func * func, struct controller * ctrl)
* Configures board * Configures board
* *
*/ */
static u32 board_added(struct pci_func * func, struct controller * ctrl) static u32 board_added(struct pci_func *func, struct controller *ctrl)
{ {
u8 hp_slot; u8 hp_slot;
u8 temp_byte; u8 temp_byte;
...@@ -2007,7 +2006,7 @@ static void interrupt_event_handler(struct controller *ctrl) ...@@ -2007,7 +2006,7 @@ static void interrupt_event_handler(struct controller *ctrl)
* Handles all pending events and exits. * Handles all pending events and exits.
* *
*/ */
void cpqhp_pushbutton_thread (unsigned long slot) void cpqhp_pushbutton_thread(unsigned long slot)
{ {
u8 hp_slot; u8 hp_slot;
u8 device; u8 device;
...@@ -2020,7 +2019,7 @@ void cpqhp_pushbutton_thread (unsigned long slot) ...@@ -2020,7 +2019,7 @@ void cpqhp_pushbutton_thread (unsigned long slot)
device = p_slot->device; device = p_slot->device;
if (is_slot_enabled (ctrl, hp_slot)) { if (is_slot_enabled(ctrl, hp_slot)) {
p_slot->state = POWEROFF_STATE; p_slot->state = POWEROFF_STATE;
/* power Down board */ /* power Down board */
func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0); func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0);
...@@ -2056,8 +2055,8 @@ void cpqhp_pushbutton_thread (unsigned long slot) ...@@ -2056,8 +2055,8 @@ void cpqhp_pushbutton_thread (unsigned long slot)
if (func != NULL && ctrl != NULL) { if (func != NULL && ctrl != NULL) {
if (cpqhp_process_SI(ctrl, func) != 0) { if (cpqhp_process_SI(ctrl, func) != 0) {
amber_LED_on (ctrl, hp_slot); amber_LED_on(ctrl, hp_slot);
green_LED_off (ctrl, hp_slot); green_LED_off(ctrl, hp_slot);
set_SOGO(ctrl); set_SOGO(ctrl);
...@@ -2073,7 +2072,7 @@ void cpqhp_pushbutton_thread (unsigned long slot) ...@@ -2073,7 +2072,7 @@ void cpqhp_pushbutton_thread (unsigned long slot)
} }
int cpqhp_process_SI (struct controller *ctrl, struct pci_func *func) int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
{ {
u8 device, hp_slot; u8 device, hp_slot;
u16 temp_word; u16 temp_word;
...@@ -2171,7 +2170,7 @@ int cpqhp_process_SI (struct controller *ctrl, struct pci_func *func) ...@@ -2171,7 +2170,7 @@ int cpqhp_process_SI (struct controller *ctrl, struct pci_func *func)
} }
int cpqhp_process_SS (struct controller *ctrl, struct pci_func *func) int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func)
{ {
u8 device, class_code, header_type, BCR; u8 device, class_code, header_type, BCR;
u8 index = 0; u8 index = 0;
...@@ -2362,7 +2361,7 @@ int cpqhp_hardware_test(struct controller *ctrl, int test_num) ...@@ -2362,7 +2361,7 @@ int cpqhp_hardware_test(struct controller *ctrl, int test_num)
* Returns 0 if success * Returns 0 if success
* *
*/ */
static u32 configure_new_device (struct controller * ctrl, struct pci_func * func, static u32 configure_new_device(struct controller *ctrl, struct pci_func *func,
u8 behind_bridge, struct resource_lists * resources) u8 behind_bridge, struct resource_lists * resources)
{ {
u8 temp_byte, function, max_functions, stop_it; u8 temp_byte, function, max_functions, stop_it;
......
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