aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2014-09-07 14:02:47 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-09-24 09:49:20 -0400
commit656f978f9af9d8d77436e8159f51f7aa1e673309 (patch)
treed1cad3653ac41062a854eb0bc0f25fc03767f766 /drivers/pci/hotplug
parent382a9c9adc1cd540f5b714b65db315fc1c0b553d (diff)
PCI: Remove unnecessary curly braces
Remove curly braces in simple "if" cases. No functional change. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_core.c4
-rw-r--r--drivers/pci/hotplug/cpcihp_zt5550.c11
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c3
-rw-r--r--drivers/pci/hotplug/cpqphp_ctrl.c15
-rw-r--r--drivers/pci/hotplug/cpqphp_nvram.c13
-rw-r--r--drivers/pci/hotplug/ibmphp_core.c6
-rw-r--r--drivers/pci/hotplug/ibmphp_ebda.c3
-rw-r--r--drivers/pci/hotplug/ibmphp_hpc.c3
8 files changed, 22 insertions, 36 deletions
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c
index e09cf7827d68..8359e29156ea 100644
--- a/drivers/pci/hotplug/cpci_hotplug_core.c
+++ b/drivers/pci/hotplug/cpci_hotplug_core.c
@@ -467,9 +467,9 @@ check_slots(void)
467 __func__, slot_name(slot), hs_csr); 467 __func__, slot_name(slot), hs_csr);
468 468
469 if (!slot->extracting) { 469 if (!slot->extracting) {
470 if (update_latch_status(slot->hotplug_slot, 0)) { 470 if (update_latch_status(slot->hotplug_slot, 0))
471 warn("failure to update latch file"); 471 warn("failure to update latch file");
472 } 472
473 slot->extracting = 1; 473 slot->extracting = 1;
474 atomic_inc(&extracting); 474 atomic_inc(&extracting);
475 } 475 }
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
index e6180201819e..cfd01e93e137 100644
--- a/drivers/pci/hotplug/cpcihp_zt5550.c
+++ b/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -182,9 +182,9 @@ static int zt5550_hc_enable_irq(void)
182{ 182{
183 u8 reg; 183 u8 reg;
184 184
185 if (hc_dev == NULL) { 185 if (hc_dev == NULL)
186 return -ENODEV; 186 return -ENODEV;
187 } 187
188 reg = readb(csr_int_mask); 188 reg = readb(csr_int_mask);
189 reg = reg & ~ENUM_INT_MASK; 189 reg = reg & ~ENUM_INT_MASK;
190 writeb(reg, csr_int_mask); 190 writeb(reg, csr_int_mask);
@@ -195,9 +195,8 @@ static int zt5550_hc_disable_irq(void)
195{ 195{
196 u8 reg; 196 u8 reg;
197 197
198 if (hc_dev == NULL) { 198 if (hc_dev == NULL)
199 return -ENODEV; 199 return -ENODEV;
200 }
201 200
202 reg = readb(csr_int_mask); 201 reg = readb(csr_int_mask);
203 reg = reg | ENUM_INT_MASK; 202 reg = reg | ENUM_INT_MASK;
@@ -210,9 +209,9 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
210 int status; 209 int status;
211 210
212 status = zt5550_hc_config(pdev); 211 status = zt5550_hc_config(pdev);
213 if (status != 0) { 212 if (status != 0)
214 return status; 213 return status;
215 } 214
216 dbg("returned from zt5550_hc_config"); 215 dbg("returned from zt5550_hc_config");
217 216
218 memset(&zt5550_hpc, 0, sizeof (struct cpci_hp_controller)); 217 memset(&zt5550_hpc, 0, sizeof (struct cpci_hp_controller));
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 4aaee746df88..a53084ddc118 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -1096,9 +1096,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1096 1096
1097 /* initialize our threads if they haven't already been started up */ 1097 /* initialize our threads if they haven't already been started up */
1098 rc = one_time_init(); 1098 rc = one_time_init();
1099 if (rc) { 1099 if (rc)
1100 goto err_free_bus; 1100 goto err_free_bus;
1101 }
1102 1101
1103 dbg("pdev = %p\n", pdev); 1102 dbg("pdev = %p\n", pdev);
1104 dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0)); 1103 dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0));
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index 476482e82fd2..c5cbefee5236 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -705,9 +705,8 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
705 if (temp == max) { 705 if (temp == max) {
706 *head = max->next; 706 *head = max->next;
707 } else { 707 } else {
708 while (temp && temp->next != max) { 708 while (temp && temp->next != max)
709 temp = temp->next; 709 temp = temp->next;
710 }
711 710
712 if (temp) 711 if (temp)
713 temp->next = max->next; 712 temp->next = max->next;
@@ -903,9 +902,8 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data)
903 /* 902 /*
904 * Check to see if it was our interrupt 903 * Check to see if it was our interrupt
905 */ 904 */
906 if (!(misc & 0x000C)) { 905 if (!(misc & 0x000C))
907 return IRQ_NONE; 906 return IRQ_NONE;
908 }
909 907
910 if (misc & 0x0004) { 908 if (misc & 0x0004) {
911 /* 909 /*
@@ -2006,9 +2004,8 @@ int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
2006 /* Check to see if the interlock is closed */ 2004 /* Check to see if the interlock is closed */
2007 tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR); 2005 tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR);
2008 2006
2009 if (tempdword & (0x01 << hp_slot)) { 2007 if (tempdword & (0x01 << hp_slot))
2010 return 1; 2008 return 1;
2011 }
2012 2009
2013 if (func->is_a_board) { 2010 if (func->is_a_board) {
2014 rc = board_replaced(func, ctrl); 2011 rc = board_replaced(func, ctrl);
@@ -2070,9 +2067,8 @@ int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
2070 } 2067 }
2071 } 2068 }
2072 2069
2073 if (rc) { 2070 if (rc)
2074 dbg("%s: rc = %d\n", __func__, rc); 2071 dbg("%s: rc = %d\n", __func__, rc);
2075 }
2076 2072
2077 if (p_slot) 2073 if (p_slot)
2078 update_slot_info(ctrl, p_slot); 2074 update_slot_info(ctrl, p_slot);
@@ -2095,9 +2091,8 @@ int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func)
2095 device = func->device; 2091 device = func->device;
2096 func = cpqhp_slot_find(ctrl->bus, device, index++); 2092 func = cpqhp_slot_find(ctrl->bus, device, index++);
2097 p_slot = cpqhp_find_slot(ctrl, device); 2093 p_slot = cpqhp_find_slot(ctrl, device);
2098 if (p_slot) { 2094 if (p_slot)
2099 physical_slot = p_slot->number; 2095 physical_slot = p_slot->number;
2100 }
2101 2096
2102 /* Make sure there are no video controllers here */ 2097 /* Make sure there are no video controllers here */
2103 while (func && !rc) { 2098 while (func && !rc) {
diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
index 0968a9bcb345..1e08ff8c229c 100644
--- a/drivers/pci/hotplug/cpqphp_nvram.c
+++ b/drivers/pci/hotplug/cpqphp_nvram.c
@@ -204,9 +204,8 @@ static int load_HRT (void __iomem *rom_start)
204 u8 temp_byte = 0xFF; 204 u8 temp_byte = 0xFF;
205 u32 rc; 205 u32 rc;
206 206
207 if (!check_for_compaq_ROM(rom_start)) { 207 if (!check_for_compaq_ROM(rom_start))
208 return -ENODEV; 208 return -ENODEV;
209 }
210 209
211 available = 1024; 210 available = 1024;
212 211
@@ -250,9 +249,8 @@ static u32 store_HRT (void __iomem *rom_start)
250 249
251 available = 1024; 250 available = 1024;
252 251
253 if (!check_for_compaq_ROM(rom_start)) { 252 if (!check_for_compaq_ROM(rom_start))
254 return(1); 253 return(1);
255 }
256 254
257 buffer = (u32*) evbuffer; 255 buffer = (u32*) evbuffer;
258 256
@@ -427,9 +425,9 @@ static u32 store_HRT (void __iomem *rom_start)
427 425
428void compaq_nvram_init (void __iomem *rom_start) 426void compaq_nvram_init (void __iomem *rom_start)
429{ 427{
430 if (rom_start) { 428 if (rom_start)
431 compaq_int15_entry_point = (rom_start + ROM_INT15_PHY_ADDR - ROM_PHY_ADDR); 429 compaq_int15_entry_point = (rom_start + ROM_INT15_PHY_ADDR - ROM_PHY_ADDR);
432 } 430
433 dbg("int15 entry = %p\n", compaq_int15_entry_point); 431 dbg("int15 entry = %p\n", compaq_int15_entry_point);
434 432
435 /* initialize our int15 lock */ 433 /* initialize our int15 lock */
@@ -661,9 +659,8 @@ int compaq_nvram_store (void __iomem *rom_start)
661 659
662 if (evbuffer_init) { 660 if (evbuffer_init) {
663 rc = store_HRT(rom_start); 661 rc = store_HRT(rom_start);
664 if (rc) { 662 if (rc)
665 err(msg_unable_to_save); 663 err(msg_unable_to_save);
666 }
667 } 664 }
668 return rc; 665 return rc;
669} 666}
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index f7b8684a7739..cfe2afe6e7aa 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -1199,9 +1199,8 @@ int ibmphp_do_disable_slot(struct slot *slot_cur)
1199 1199
1200 debug("DISABLING SLOT...\n"); 1200 debug("DISABLING SLOT...\n");
1201 1201
1202 if ((slot_cur == NULL) || (slot_cur->ctrl == NULL)) { 1202 if ((slot_cur == NULL) || (slot_cur->ctrl == NULL))
1203 return -ENODEV; 1203 return -ENODEV;
1204 }
1205 1204
1206 flag = slot_cur->flag; 1205 flag = slot_cur->flag;
1207 slot_cur->flag = 1; 1206 slot_cur->flag = 1;
@@ -1355,9 +1354,8 @@ static int __init ibmphp_init(void)
1355 } 1354 }
1356 1355
1357 ibmphp_print_test(); 1356 ibmphp_print_test();
1358 if ((rc = ibmphp_hpc_start_poll_thread())) { 1357 if ((rc = ibmphp_hpc_start_poll_thread()))
1359 goto error; 1358 goto error;
1360 }
1361 1359
1362exit: 1360exit:
1363 return rc; 1361 return rc;
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 0f65ac555434..d9b197d5c6b4 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -215,9 +215,8 @@ static void __init print_ebda_hpc (void)
215 debug ("%s - cap of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_cap); 215 debug ("%s - cap of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_cap);
216 } 216 }
217 217
218 for (index = 0; index < hpc_ptr->bus_count; index++) { 218 for (index = 0; index < hpc_ptr->bus_count; index++)
219 debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __func__, hpc_ptr->buses[index].bus_num); 219 debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __func__, hpc_ptr->buses[index].bus_num);
220 }
221 220
222 debug ("%s - type of hpc: %x\n", __func__, hpc_ptr->ctlr_type); 221 debug ("%s - type of hpc: %x\n", __func__, hpc_ptr->ctlr_type);
223 switch (hpc_ptr->ctlr_type) { 222 switch (hpc_ptr->ctlr_type) {
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index a936022956e6..220876715a08 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -997,9 +997,8 @@ static int process_changeinstatus (struct slot *pslot, struct slot *poldslot)
997 rc = ibmphp_do_disable_slot (pslot); 997 rc = ibmphp_do_disable_slot (pslot);
998 } 998 }
999 999
1000 if (update || disable) { 1000 if (update || disable)
1001 ibmphp_update_slot_info (pslot); 1001 ibmphp_update_slot_info (pslot);
1002 }
1003 1002
1004 debug ("%s - Exit rc[%d] disable[%x] update[%x]\n", __func__, rc, disable, update); 1003 debug ("%s - Exit rc[%d] disable[%x] update[%x]\n", __func__, rc, disable, update);
1005 1004