aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorKristen Accardi <kristen.c.accardi@intel.com>2006-03-14 19:24:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 17:35:17 -0500
commitdc6712d1261ee4585771724320d28580888818eb (patch)
tree14bb88b17952a540b4764653340ae30c14959b12 /drivers/pci/hotplug
parent783c49fc506d9afe4784390b556fa25ede5d6d1f (diff)
[PATCH] ibmphp: remove TRUE and FALSE
This patch removes the defines TRUE and FALSE and just uses 0 or 1. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/ibmphp.h2
-rw-r--r--drivers/pci/hotplug/ibmphp_core.c4
-rw-r--r--drivers/pci/hotplug/ibmphp_ebda.c2
-rw-r--r--drivers/pci/hotplug/ibmphp_hpc.c54
-rw-r--r--drivers/pci/hotplug/ibmphp_pci.c58
-rw-r--r--drivers/pci/hotplug/ibmphp_res.c48
6 files changed, 83 insertions, 85 deletions
diff --git a/drivers/pci/hotplug/ibmphp.h b/drivers/pci/hotplug/ibmphp.h
index c22e0284d7b1..dba6d8ca9bda 100644
--- a/drivers/pci/hotplug/ibmphp.h
+++ b/drivers/pci/hotplug/ibmphp.h
@@ -406,8 +406,6 @@ extern void ibmphp_hpc_stop_poll_thread (void);
406//---------------------------------------------------------------------------- 406//----------------------------------------------------------------------------
407// HPC return codes 407// HPC return codes
408//---------------------------------------------------------------------------- 408//----------------------------------------------------------------------------
409#define FALSE 0x00
410#define TRUE 0x01
411#define HPC_ERROR 0xFF 409#define HPC_ERROR 0xFF
412 410
413//----------------------------------------------------------------------------- 411//-----------------------------------------------------------------------------
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index 45e2a0d9b596..e13d5b87241a 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -1239,9 +1239,9 @@ int ibmphp_do_disable_slot(struct slot *slot_cur)
1239 } 1239 }
1240 1240
1241 flag = slot_cur->flag; 1241 flag = slot_cur->flag;
1242 slot_cur->flag = TRUE; 1242 slot_cur->flag = 1;
1243 1243
1244 if (flag == TRUE) { 1244 if (flag == 1) {
1245 rc = validate(slot_cur, DISABLE); 1245 rc = validate(slot_cur, DISABLE);
1246 /* checking if powered off already & valid slot # */ 1246 /* checking if powered off already & valid slot # */
1247 if (rc) 1247 if (rc)
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index ba12034c5d3a..05e4f5a1927a 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -944,7 +944,7 @@ static int __init ebda_rsrc_controller (void)
944 goto error_no_slot; 944 goto error_no_slot;
945 } 945 }
946 946
947 tmp_slot->flag = TRUE; 947 tmp_slot->flag = 1;
948 948
949 tmp_slot->capabilities = hpc_ptr->slots[index].slot_cap; 949 tmp_slot->capabilities = hpc_ptr->slots[index].slot_cap;
950 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_133_MAX) == EBDA_SLOT_133_MAX) 950 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_133_MAX) == EBDA_SLOT_133_MAX)
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index d680bb472c7b..c3ac98a0a6a6 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -38,7 +38,7 @@
38 38
39#include "ibmphp.h" 39#include "ibmphp.h"
40 40
41static int to_debug = FALSE; 41static int to_debug = 0;
42#define debug_polling(fmt, arg...) do { if (to_debug) debug (fmt, arg); } while (0) 42#define debug_polling(fmt, arg...) do { if (to_debug) debug (fmt, arg); } while (0)
43 43
44//---------------------------------------------------------------------------- 44//----------------------------------------------------------------------------
@@ -95,8 +95,8 @@ static int to_debug = FALSE;
95//---------------------------------------------------------------------------- 95//----------------------------------------------------------------------------
96// macro utilities 96// macro utilities
97//---------------------------------------------------------------------------- 97//----------------------------------------------------------------------------
98// if bits 20,22,25,26,27,29,30 are OFF return TRUE 98// if bits 20,22,25,26,27,29,30 are OFF return 1
99#define HPC_I2CSTATUS_CHECK(s) ((u8)((s & 0x00000A76) ? FALSE : TRUE)) 99#define HPC_I2CSTATUS_CHECK(s) ((u8)((s & 0x00000A76) ? 0 : 1))
100 100
101//---------------------------------------------------------------------------- 101//----------------------------------------------------------------------------
102// global variables 102// global variables
@@ -136,8 +136,8 @@ void __init ibmphp_hpc_initvars (void)
136 mutex_init(&sem_hpcaccess); 136 mutex_init(&sem_hpcaccess);
137 init_MUTEX (&semOperations); 137 init_MUTEX (&semOperations);
138 init_MUTEX_LOCKED (&sem_exit); 138 init_MUTEX_LOCKED (&sem_exit);
139 to_debug = FALSE; 139 to_debug = 0;
140 ibmphp_shutdown = FALSE; 140 ibmphp_shutdown = 0;
141 tid_poll = 0; 141 tid_poll = 0;
142 142
143 debug ("%s - Exit\n", __FUNCTION__); 143 debug ("%s - Exit\n", __FUNCTION__);
@@ -739,21 +739,21 @@ int ibmphp_hpc_writeslot (struct slot * pslot, u8 cmd)
739 // check controller is still not working on the command 739 // check controller is still not working on the command
740 //-------------------------------------------------------------------- 740 //--------------------------------------------------------------------
741 timeout = CMD_COMPLETE_TOUT_SEC; 741 timeout = CMD_COMPLETE_TOUT_SEC;
742 done = FALSE; 742 done = 0;
743 while (!done) { 743 while (!done) {
744 rc = hpc_wait_ctlr_notworking (HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, 744 rc = hpc_wait_ctlr_notworking (HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar,
745 &status); 745 &status);
746 if (!rc) { 746 if (!rc) {
747 if (NEEDTOCHECK_CMDSTATUS (cmd)) { 747 if (NEEDTOCHECK_CMDSTATUS (cmd)) {
748 if (CTLR_FINISHED (status) == HPC_CTLR_FINISHED_YES) 748 if (CTLR_FINISHED (status) == HPC_CTLR_FINISHED_YES)
749 done = TRUE; 749 done = 1;
750 } else 750 } else
751 done = TRUE; 751 done = 1;
752 } 752 }
753 if (!done) { 753 if (!done) {
754 msleep(1000); 754 msleep(1000);
755 if (timeout < 1) { 755 if (timeout < 1) {
756 done = TRUE; 756 done = 1;
757 err ("%s - Error command complete timeout\n", __FUNCTION__); 757 err ("%s - Error command complete timeout\n", __FUNCTION__);
758 rc = -EFAULT; 758 rc = -EFAULT;
759 } else 759 } else
@@ -799,7 +799,7 @@ void free_hpc_access (void)
799void ibmphp_lock_operations (void) 799void ibmphp_lock_operations (void)
800{ 800{
801 down (&semOperations); 801 down (&semOperations);
802 to_debug = TRUE; 802 to_debug = 1;
803} 803}
804 804
805/*---------------------------------------------------------------------- 805/*----------------------------------------------------------------------
@@ -809,7 +809,7 @@ void ibmphp_unlock_operations (void)
809{ 809{
810 debug ("%s - Entry\n", __FUNCTION__); 810 debug ("%s - Entry\n", __FUNCTION__);
811 up (&semOperations); 811 up (&semOperations);
812 to_debug = FALSE; 812 to_debug = 0;
813 debug ("%s - Exit\n", __FUNCTION__); 813 debug ("%s - Exit\n", __FUNCTION__);
814} 814}
815 815
@@ -937,40 +937,40 @@ static int process_changeinstatus (struct slot *pslot, struct slot *poldslot)
937{ 937{
938 u8 status; 938 u8 status;
939 int rc = 0; 939 int rc = 0;
940 u8 disable = FALSE; 940 u8 disable = 0;
941 u8 update = FALSE; 941 u8 update = 0;
942 942
943 debug ("process_changeinstatus - Entry pslot[%p], poldslot[%p]\n", pslot, poldslot); 943 debug ("process_changeinstatus - Entry pslot[%p], poldslot[%p]\n", pslot, poldslot);
944 944
945 // bit 0 - HPC_SLOT_POWER 945 // bit 0 - HPC_SLOT_POWER
946 if ((pslot->status & 0x01) != (poldslot->status & 0x01)) 946 if ((pslot->status & 0x01) != (poldslot->status & 0x01))
947 update = TRUE; 947 update = 1;
948 948
949 // bit 1 - HPC_SLOT_CONNECT 949 // bit 1 - HPC_SLOT_CONNECT
950 // ignore 950 // ignore
951 951
952 // bit 2 - HPC_SLOT_ATTN 952 // bit 2 - HPC_SLOT_ATTN
953 if ((pslot->status & 0x04) != (poldslot->status & 0x04)) 953 if ((pslot->status & 0x04) != (poldslot->status & 0x04))
954 update = TRUE; 954 update = 1;
955 955
956 // bit 3 - HPC_SLOT_PRSNT2 956 // bit 3 - HPC_SLOT_PRSNT2
957 // bit 4 - HPC_SLOT_PRSNT1 957 // bit 4 - HPC_SLOT_PRSNT1
958 if (((pslot->status & 0x08) != (poldslot->status & 0x08)) 958 if (((pslot->status & 0x08) != (poldslot->status & 0x08))
959 || ((pslot->status & 0x10) != (poldslot->status & 0x10))) 959 || ((pslot->status & 0x10) != (poldslot->status & 0x10)))
960 update = TRUE; 960 update = 1;
961 961
962 // bit 5 - HPC_SLOT_PWRGD 962 // bit 5 - HPC_SLOT_PWRGD
963 if ((pslot->status & 0x20) != (poldslot->status & 0x20)) 963 if ((pslot->status & 0x20) != (poldslot->status & 0x20))
964 // OFF -> ON: ignore, ON -> OFF: disable slot 964 // OFF -> ON: ignore, ON -> OFF: disable slot
965 if ((poldslot->status & 0x20) && (SLOT_CONNECT (poldslot->status) == HPC_SLOT_CONNECTED) && (SLOT_PRESENT (poldslot->status))) 965 if ((poldslot->status & 0x20) && (SLOT_CONNECT (poldslot->status) == HPC_SLOT_CONNECTED) && (SLOT_PRESENT (poldslot->status)))
966 disable = TRUE; 966 disable = 1;
967 967
968 // bit 6 - HPC_SLOT_BUS_SPEED 968 // bit 6 - HPC_SLOT_BUS_SPEED
969 // ignore 969 // ignore
970 970
971 // bit 7 - HPC_SLOT_LATCH 971 // bit 7 - HPC_SLOT_LATCH
972 if ((pslot->status & 0x80) != (poldslot->status & 0x80)) { 972 if ((pslot->status & 0x80) != (poldslot->status & 0x80)) {
973 update = TRUE; 973 update = 1;
974 // OPEN -> CLOSE 974 // OPEN -> CLOSE
975 if (pslot->status & 0x80) { 975 if (pslot->status & 0x80) {
976 if (SLOT_PWRGD (pslot->status)) { 976 if (SLOT_PWRGD (pslot->status)) {
@@ -979,7 +979,7 @@ static int process_changeinstatus (struct slot *pslot, struct slot *poldslot)
979 msleep(1000); 979 msleep(1000);
980 rc = ibmphp_hpc_readslot (pslot, READ_SLOTSTATUS, &status); 980 rc = ibmphp_hpc_readslot (pslot, READ_SLOTSTATUS, &status);
981 if (SLOT_PWRGD (status)) 981 if (SLOT_PWRGD (status))
982 update = TRUE; 982 update = 1;
983 else // overwrite power in pslot to OFF 983 else // overwrite power in pslot to OFF
984 pslot->status &= ~HPC_SLOT_POWER; 984 pslot->status &= ~HPC_SLOT_POWER;
985 } 985 }
@@ -987,17 +987,17 @@ static int process_changeinstatus (struct slot *pslot, struct slot *poldslot)
987 // CLOSE -> OPEN 987 // CLOSE -> OPEN
988 else if ((SLOT_PWRGD (poldslot->status) == HPC_SLOT_PWRGD_GOOD) 988 else if ((SLOT_PWRGD (poldslot->status) == HPC_SLOT_PWRGD_GOOD)
989 && (SLOT_CONNECT (poldslot->status) == HPC_SLOT_CONNECTED) && (SLOT_PRESENT (poldslot->status))) { 989 && (SLOT_CONNECT (poldslot->status) == HPC_SLOT_CONNECTED) && (SLOT_PRESENT (poldslot->status))) {
990 disable = TRUE; 990 disable = 1;
991 } 991 }
992 // else - ignore 992 // else - ignore
993 } 993 }
994 // bit 4 - HPC_SLOT_BLINK_ATTN 994 // bit 4 - HPC_SLOT_BLINK_ATTN
995 if ((pslot->ext_status & 0x08) != (poldslot->ext_status & 0x08)) 995 if ((pslot->ext_status & 0x08) != (poldslot->ext_status & 0x08))
996 update = TRUE; 996 update = 1;
997 997
998 if (disable) { 998 if (disable) {
999 debug ("process_changeinstatus - disable slot\n"); 999 debug ("process_changeinstatus - disable slot\n");
1000 pslot->flag = FALSE; 1000 pslot->flag = 0;
1001 rc = ibmphp_do_disable_slot (pslot); 1001 rc = ibmphp_do_disable_slot (pslot);
1002 } 1002 }
1003 1003
@@ -1102,7 +1102,7 @@ void __exit ibmphp_hpc_stop_poll_thread (void)
1102{ 1102{
1103 debug ("%s - Entry\n", __FUNCTION__); 1103 debug ("%s - Entry\n", __FUNCTION__);
1104 1104
1105 ibmphp_shutdown = TRUE; 1105 ibmphp_shutdown = 1;
1106 debug ("before locking operations \n"); 1106 debug ("before locking operations \n");
1107 ibmphp_lock_operations (); 1107 ibmphp_lock_operations ();
1108 debug ("after locking operations \n"); 1108 debug ("after locking operations \n");
@@ -1136,7 +1136,7 @@ static int hpc_wait_ctlr_notworking (int timeout, struct controller *ctlr_ptr, v
1136 u8 * pstatus) 1136 u8 * pstatus)
1137{ 1137{
1138 int rc = 0; 1138 int rc = 0;
1139 u8 done = FALSE; 1139 u8 done = 0;
1140 1140
1141 debug_polling ("hpc_wait_ctlr_notworking - Entry timeout[%d]\n", timeout); 1141 debug_polling ("hpc_wait_ctlr_notworking - Entry timeout[%d]\n", timeout);
1142 1142
@@ -1144,14 +1144,14 @@ static int hpc_wait_ctlr_notworking (int timeout, struct controller *ctlr_ptr, v
1144 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, WPG_CTLR_INDEX); 1144 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, WPG_CTLR_INDEX);
1145 if (*pstatus == HPC_ERROR) { 1145 if (*pstatus == HPC_ERROR) {
1146 rc = HPC_ERROR; 1146 rc = HPC_ERROR;
1147 done = TRUE; 1147 done = 1;
1148 } 1148 }
1149 if (CTLR_WORKING (*pstatus) == HPC_CTLR_WORKING_NO) 1149 if (CTLR_WORKING (*pstatus) == HPC_CTLR_WORKING_NO)
1150 done = TRUE; 1150 done = 1;
1151 if (!done) { 1151 if (!done) {
1152 msleep(1000); 1152 msleep(1000);
1153 if (timeout < 1) { 1153 if (timeout < 1) {
1154 done = TRUE; 1154 done = 1;
1155 err ("HPCreadslot - Error ctlr timeout\n"); 1155 err ("HPCreadslot - Error ctlr timeout\n");
1156 rc = HPC_ERROR; 1156 rc = HPC_ERROR;
1157 } else 1157 } else
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index 97753ddcd856..d87a9e3eaeeb 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -199,7 +199,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno)
199 } 199 }
200 200
201 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); 201 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number);
202 flag = FALSE; 202 flag = 0;
203 for (i = 0; i < 32; i++) { 203 for (i = 0; i < 32; i++) {
204 if (func->devices[i]) { 204 if (func->devices[i]) {
205 newfunc = kzalloc(sizeof(*newfunc), GFP_KERNEL); 205 newfunc = kzalloc(sizeof(*newfunc), GFP_KERNEL);
@@ -226,7 +226,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno)
226 cleanup_count = 2; 226 cleanup_count = 2;
227 goto error; 227 goto error;
228 } 228 }
229 flag = TRUE; 229 flag = 1;
230 } 230 }
231 } 231 }
232 232
@@ -272,7 +272,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno)
272 cur_func->busno, device, function); 272 cur_func->busno, device, function);
273 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); 273 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number);
274 debug ("after configuring bridge..., sec_number = %x\n", sec_number); 274 debug ("after configuring bridge..., sec_number = %x\n", sec_number);
275 flag = FALSE; 275 flag = 0;
276 for (i = 0; i < 32; i++) { 276 for (i = 0; i < 32; i++) {
277 if (func->devices[i]) { 277 if (func->devices[i]) {
278 debug ("inside for loop, device is %x\n", i); 278 debug ("inside for loop, device is %x\n", i);
@@ -301,7 +301,7 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno)
301 cleanup_count = 2; 301 cleanup_count = 2;
302 goto error; 302 goto error;
303 } 303 }
304 flag = TRUE; 304 flag = 1;
305 } 305 }
306 } 306 }
307 307
@@ -449,7 +449,7 @@ static int configure_device (struct pci_func *func)
449 pfmem[count]->devfunc = PCI_DEVFN(func->device, 449 pfmem[count]->devfunc = PCI_DEVFN(func->device,
450 func->function); 450 func->function);
451 pfmem[count]->len = len[count]; 451 pfmem[count]->len = len[count];
452 pfmem[count]->fromMem = FALSE; 452 pfmem[count]->fromMem = 0;
453 if (ibmphp_check_resource (pfmem[count], 0) == 0) { 453 if (ibmphp_check_resource (pfmem[count], 0) == 0) {
454 ibmphp_add_resource (pfmem[count]); 454 ibmphp_add_resource (pfmem[count]);
455 func->pfmem[count] = pfmem[count]; 455 func->pfmem[count] = pfmem[count];
@@ -467,7 +467,7 @@ static int configure_device (struct pci_func *func)
467 debug ("there's no pfmem... going into mem.\n"); 467 debug ("there's no pfmem... going into mem.\n");
468 if (ibmphp_check_resource (mem_tmp, 0) == 0) { 468 if (ibmphp_check_resource (mem_tmp, 0) == 0) {
469 ibmphp_add_resource (mem_tmp); 469 ibmphp_add_resource (mem_tmp);
470 pfmem[count]->fromMem = TRUE; 470 pfmem[count]->fromMem = 1;
471 pfmem[count]->rangeno = mem_tmp->rangeno; 471 pfmem[count]->rangeno = mem_tmp->rangeno;
472 pfmem[count]->start = mem_tmp->start; 472 pfmem[count]->start = mem_tmp->start;
473 pfmem[count]->end = mem_tmp->end; 473 pfmem[count]->end = mem_tmp->end;
@@ -571,11 +571,11 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
571 u16 pfmem_base; 571 u16 pfmem_base;
572 u32 bar[2]; 572 u32 bar[2];
573 u32 len[2]; 573 u32 len[2];
574 u8 flag_io = FALSE; 574 u8 flag_io = 0;
575 u8 flag_mem = FALSE; 575 u8 flag_mem = 0;
576 u8 flag_pfmem = FALSE; 576 u8 flag_pfmem = 0;
577 u8 need_io_upper = FALSE; 577 u8 need_io_upper = 0;
578 u8 need_pfmem_upper = FALSE; 578 u8 need_pfmem_upper = 0;
579 struct res_needed *amount_needed = NULL; 579 struct res_needed *amount_needed = NULL;
580 struct resource_node *io = NULL; 580 struct resource_node *io = NULL;
581 struct resource_node *bus_io[2] = {NULL, NULL}; 581 struct resource_node *bus_io[2] = {NULL, NULL};
@@ -713,7 +713,7 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
713 bus_pfmem[count]->devfunc = PCI_DEVFN(func->device, 713 bus_pfmem[count]->devfunc = PCI_DEVFN(func->device,
714 func->function); 714 func->function);
715 bus_pfmem[count]->len = len[count]; 715 bus_pfmem[count]->len = len[count];
716 bus_pfmem[count]->fromMem = FALSE; 716 bus_pfmem[count]->fromMem = 0;
717 if (ibmphp_check_resource (bus_pfmem[count], 0) == 0) { 717 if (ibmphp_check_resource (bus_pfmem[count], 0) == 0) {
718 ibmphp_add_resource (bus_pfmem[count]); 718 ibmphp_add_resource (bus_pfmem[count]);
719 func->pfmem[count] = bus_pfmem[count]; 719 func->pfmem[count] = bus_pfmem[count];
@@ -730,7 +730,7 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
730 mem_tmp->len = bus_pfmem[count]->len; 730 mem_tmp->len = bus_pfmem[count]->len;
731 if (ibmphp_check_resource (mem_tmp, 0) == 0) { 731 if (ibmphp_check_resource (mem_tmp, 0) == 0) {
732 ibmphp_add_resource (mem_tmp); 732 ibmphp_add_resource (mem_tmp);
733 bus_pfmem[count]->fromMem = TRUE; 733 bus_pfmem[count]->fromMem = 1;
734 bus_pfmem[count]->rangeno = mem_tmp->rangeno; 734 bus_pfmem[count]->rangeno = mem_tmp->rangeno;
735 ibmphp_add_pfmem_from_mem (bus_pfmem[count]); 735 ibmphp_add_pfmem_from_mem (bus_pfmem[count]);
736 func->pfmem[count] = bus_pfmem[count]; 736 func->pfmem[count] = bus_pfmem[count];
@@ -826,7 +826,7 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
826 826
827 if (!amount_needed->io) { 827 if (!amount_needed->io) {
828 debug ("it doesn't want IO?\n"); 828 debug ("it doesn't want IO?\n");
829 flag_io = TRUE; 829 flag_io = 1;
830 } else { 830 } else {
831 debug ("it wants %x IO behind the bridge\n", amount_needed->io); 831 debug ("it wants %x IO behind the bridge\n", amount_needed->io);
832 io = kzalloc(sizeof(*io), GFP_KERNEL); 832 io = kzalloc(sizeof(*io), GFP_KERNEL);
@@ -843,13 +843,13 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
843 if (ibmphp_check_resource (io, 1) == 0) { 843 if (ibmphp_check_resource (io, 1) == 0) {
844 debug ("were we able to add io\n"); 844 debug ("were we able to add io\n");
845 ibmphp_add_resource (io); 845 ibmphp_add_resource (io);
846 flag_io = TRUE; 846 flag_io = 1;
847 } 847 }
848 } 848 }
849 849
850 if (!amount_needed->mem) { 850 if (!amount_needed->mem) {
851 debug ("it doesn't want n.e.memory?\n"); 851 debug ("it doesn't want n.e.memory?\n");
852 flag_mem = TRUE; 852 flag_mem = 1;
853 } else { 853 } else {
854 debug ("it wants %x memory behind the bridge\n", amount_needed->mem); 854 debug ("it wants %x memory behind the bridge\n", amount_needed->mem);
855 mem = kzalloc(sizeof(*mem), GFP_KERNEL); 855 mem = kzalloc(sizeof(*mem), GFP_KERNEL);
@@ -864,14 +864,14 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
864 mem->len = amount_needed->mem; 864 mem->len = amount_needed->mem;
865 if (ibmphp_check_resource (mem, 1) == 0) { 865 if (ibmphp_check_resource (mem, 1) == 0) {
866 ibmphp_add_resource (mem); 866 ibmphp_add_resource (mem);
867 flag_mem = TRUE; 867 flag_mem = 1;
868 debug ("were we able to add mem\n"); 868 debug ("were we able to add mem\n");
869 } 869 }
870 } 870 }
871 871
872 if (!amount_needed->pfmem) { 872 if (!amount_needed->pfmem) {
873 debug ("it doesn't want n.e.pfmem mem?\n"); 873 debug ("it doesn't want n.e.pfmem mem?\n");
874 flag_pfmem = TRUE; 874 flag_pfmem = 1;
875 } else { 875 } else {
876 debug ("it wants %x pfmemory behind the bridge\n", amount_needed->pfmem); 876 debug ("it wants %x pfmemory behind the bridge\n", amount_needed->pfmem);
877 pfmem = kzalloc(sizeof(*pfmem), GFP_KERNEL); 877 pfmem = kzalloc(sizeof(*pfmem), GFP_KERNEL);
@@ -884,10 +884,10 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
884 pfmem->busno = func->busno; 884 pfmem->busno = func->busno;
885 pfmem->devfunc = PCI_DEVFN(func->device, func->function); 885 pfmem->devfunc = PCI_DEVFN(func->device, func->function);
886 pfmem->len = amount_needed->pfmem; 886 pfmem->len = amount_needed->pfmem;
887 pfmem->fromMem = FALSE; 887 pfmem->fromMem = 0;
888 if (ibmphp_check_resource (pfmem, 1) == 0) { 888 if (ibmphp_check_resource (pfmem, 1) == 0) {
889 ibmphp_add_resource (pfmem); 889 ibmphp_add_resource (pfmem);
890 flag_pfmem = TRUE; 890 flag_pfmem = 1;
891 } else { 891 } else {
892 mem_tmp = kzalloc(sizeof(*mem_tmp), GFP_KERNEL); 892 mem_tmp = kzalloc(sizeof(*mem_tmp), GFP_KERNEL);
893 if (!mem_tmp) { 893 if (!mem_tmp) {
@@ -901,10 +901,10 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
901 mem_tmp->len = pfmem->len; 901 mem_tmp->len = pfmem->len;
902 if (ibmphp_check_resource (mem_tmp, 1) == 0) { 902 if (ibmphp_check_resource (mem_tmp, 1) == 0) {
903 ibmphp_add_resource (mem_tmp); 903 ibmphp_add_resource (mem_tmp);
904 pfmem->fromMem = TRUE; 904 pfmem->fromMem = 1;
905 pfmem->rangeno = mem_tmp->rangeno; 905 pfmem->rangeno = mem_tmp->rangeno;
906 ibmphp_add_pfmem_from_mem (pfmem); 906 ibmphp_add_pfmem_from_mem (pfmem);
907 flag_pfmem = TRUE; 907 flag_pfmem = 1;
908 } 908 }
909 } 909 }
910 } 910 }
@@ -950,11 +950,11 @@ static int configure_bridge (struct pci_func **func_passed, u8 slotno)
950 950
951 if ((io_base & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) { 951 if ((io_base & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) {
952 debug ("io 32\n"); 952 debug ("io 32\n");
953 need_io_upper = TRUE; 953 need_io_upper = 1;
954 } 954 }
955 if ((pfmem_base & PCI_PREF_RANGE_TYPE_MASK) == PCI_PREF_RANGE_TYPE_64) { 955 if ((pfmem_base & PCI_PREF_RANGE_TYPE_MASK) == PCI_PREF_RANGE_TYPE_64) {
956 debug ("pfmem 64\n"); 956 debug ("pfmem 64\n");
957 need_pfmem_upper = TRUE; 957 need_pfmem_upper = 1;
958 } 958 }
959 959
960 if (bus->noIORanges) { 960 if (bus->noIORanges) {
@@ -1119,7 +1119,7 @@ static struct res_needed *scan_behind_bridge (struct pci_func * func, u8 busno)
1119 debug ("hdr_type behind the bridge is %x\n", hdr_type); 1119 debug ("hdr_type behind the bridge is %x\n", hdr_type);
1120 if (hdr_type & PCI_HEADER_TYPE_BRIDGE) { 1120 if (hdr_type & PCI_HEADER_TYPE_BRIDGE) {
1121 err ("embedded bridges not supported for hot-plugging.\n"); 1121 err ("embedded bridges not supported for hot-plugging.\n");
1122 amount->not_correct = TRUE; 1122 amount->not_correct = 1;
1123 return amount; 1123 return amount;
1124 } 1124 }
1125 1125
@@ -1127,12 +1127,12 @@ static struct res_needed *scan_behind_bridge (struct pci_func * func, u8 busno)
1127 if (class == PCI_CLASS_NOT_DEFINED_VGA) { 1127 if (class == PCI_CLASS_NOT_DEFINED_VGA) {
1128 err ("The device %x is VGA compatible and as is not supported for hot plugging. " 1128 err ("The device %x is VGA compatible and as is not supported for hot plugging. "
1129 "Please choose another device.\n", device); 1129 "Please choose another device.\n", device);
1130 amount->not_correct = TRUE; 1130 amount->not_correct = 1;
1131 return amount; 1131 return amount;
1132 } else if (class == PCI_CLASS_DISPLAY_VGA) { 1132 } else if (class == PCI_CLASS_DISPLAY_VGA) {
1133 err ("The device %x is not supported for hot plugging. " 1133 err ("The device %x is not supported for hot plugging. "
1134 "Please choose another device.\n", device); 1134 "Please choose another device.\n", device);
1135 amount->not_correct = TRUE; 1135 amount->not_correct = 1;
1136 return amount; 1136 return amount;
1137 } 1137 }
1138 1138
@@ -1192,9 +1192,9 @@ static struct res_needed *scan_behind_bridge (struct pci_func * func, u8 busno)
1192 } /* end for */ 1192 } /* end for */
1193 1193
1194 if (!howmany) 1194 if (!howmany)
1195 amount->not_correct = TRUE; 1195 amount->not_correct = 1;
1196 else 1196 else
1197 amount->not_correct = FALSE; 1197 amount->not_correct = 0;
1198 if ((amount->io) && (amount->io < IOBRIDGE)) 1198 if ((amount->io) && (amount->io < IOBRIDGE))
1199 amount->io = IOBRIDGE; 1199 amount->io = IOBRIDGE;
1200 if ((amount->mem) && (amount->mem < MEMBRIDGE)) 1200 if ((amount->mem) && (amount->mem < MEMBRIDGE))
diff --git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c
index 852a98bf07d3..5636b1ac2a2e 100644
--- a/drivers/pci/hotplug/ibmphp_res.c
+++ b/drivers/pci/hotplug/ibmphp_res.c
@@ -325,7 +325,7 @@ int __init ibmphp_rsrc_init (void)
325 if (!new_pfmem) 325 if (!new_pfmem)
326 return -ENOMEM; 326 return -ENOMEM;
327 new_pfmem->type = PFMEM; 327 new_pfmem->type = PFMEM;
328 new_pfmem->fromMem = FALSE; 328 new_pfmem->fromMem = 0;
329 if (ibmphp_add_resource (new_pfmem) < 0) { 329 if (ibmphp_add_resource (new_pfmem) < 0) {
330 newbus = alloc_error_bus (curr, 0, 0); 330 newbus = alloc_error_bus (curr, 0, 0);
331 if (!newbus) 331 if (!newbus)
@@ -462,7 +462,7 @@ static int add_range (int type, struct range_node *range, struct bus_node *bus_c
462static void update_resources (struct bus_node *bus_cur, int type, int rangeno) 462static void update_resources (struct bus_node *bus_cur, int type, int rangeno)
463{ 463{
464 struct resource_node *res = NULL; 464 struct resource_node *res = NULL;
465 u8 eol = FALSE; /* end of list indicator */ 465 u8 eol = 0; /* end of list indicator */
466 466
467 switch (type) { 467 switch (type) {
468 case MEM: 468 case MEM:
@@ -488,7 +488,7 @@ static void update_resources (struct bus_node *bus_cur, int type, int rangeno)
488 else if (res->nextRange) 488 else if (res->nextRange)
489 res = res->nextRange; 489 res = res->nextRange;
490 else { 490 else {
491 eol = TRUE; 491 eol = 1;
492 break; 492 break;
493 } 493 }
494 } 494 }
@@ -979,7 +979,7 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
979 int noranges = 0; 979 int noranges = 0;
980 u32 tmp_start; /* this is to make sure start address is divisible by the length needed */ 980 u32 tmp_start; /* this is to make sure start address is divisible by the length needed */
981 u32 tmp_divide; 981 u32 tmp_divide;
982 u8 flag = FALSE; 982 u8 flag = 0;
983 983
984 if (!res) 984 if (!res)
985 return -EINVAL; 985 return -EINVAL;
@@ -1046,17 +1046,17 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
1046 1046
1047 if ((range->start % tmp_divide) == 0) { 1047 if ((range->start % tmp_divide) == 0) {
1048 /* just perfect, starting address is divisible by length */ 1048 /* just perfect, starting address is divisible by length */
1049 flag = TRUE; 1049 flag = 1;
1050 len_cur = len_tmp; 1050 len_cur = len_tmp;
1051 start_cur = range->start; 1051 start_cur = range->start;
1052 } else { 1052 } else {
1053 /* Needs adjusting */ 1053 /* Needs adjusting */
1054 tmp_start = range->start; 1054 tmp_start = range->start;
1055 flag = FALSE; 1055 flag = 0;
1056 1056
1057 while ((len_tmp = res_cur->start - 1 - tmp_start) >= res->len) { 1057 while ((len_tmp = res_cur->start - 1 - tmp_start) >= res->len) {
1058 if ((tmp_start % tmp_divide) == 0) { 1058 if ((tmp_start % tmp_divide) == 0) {
1059 flag = TRUE; 1059 flag = 1;
1060 len_cur = len_tmp; 1060 len_cur = len_tmp;
1061 start_cur = tmp_start; 1061 start_cur = tmp_start;
1062 break; 1062 break;
@@ -1085,17 +1085,17 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
1085 1085
1086 if (((res_cur->end + 1) % tmp_divide) == 0) { 1086 if (((res_cur->end + 1) % tmp_divide) == 0) {
1087 /* just perfect, starting address is divisible by length */ 1087 /* just perfect, starting address is divisible by length */
1088 flag = TRUE; 1088 flag = 1;
1089 len_cur = len_tmp; 1089 len_cur = len_tmp;
1090 start_cur = res_cur->end + 1; 1090 start_cur = res_cur->end + 1;
1091 } else { 1091 } else {
1092 /* Needs adjusting */ 1092 /* Needs adjusting */
1093 tmp_start = res_cur->end + 1; 1093 tmp_start = res_cur->end + 1;
1094 flag = FALSE; 1094 flag = 0;
1095 1095
1096 while ((len_tmp = range->end - tmp_start) >= res->len) { 1096 while ((len_tmp = range->end - tmp_start) >= res->len) {
1097 if ((tmp_start % tmp_divide) == 0) { 1097 if ((tmp_start % tmp_divide) == 0) {
1098 flag = TRUE; 1098 flag = 1;
1099 len_cur = len_tmp; 1099 len_cur = len_tmp;
1100 start_cur = tmp_start; 1100 start_cur = tmp_start;
1101 break; 1101 break;
@@ -1123,17 +1123,17 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
1123 if ((len_tmp < len_cur) || (len_cur == 0)) { 1123 if ((len_tmp < len_cur) || (len_cur == 0)) {
1124 if ((range->start % tmp_divide) == 0) { 1124 if ((range->start % tmp_divide) == 0) {
1125 /* just perfect, starting address is divisible by length */ 1125 /* just perfect, starting address is divisible by length */
1126 flag = TRUE; 1126 flag = 1;
1127 len_cur = len_tmp; 1127 len_cur = len_tmp;
1128 start_cur = range->start; 1128 start_cur = range->start;
1129 } else { 1129 } else {
1130 /* Needs adjusting */ 1130 /* Needs adjusting */
1131 tmp_start = range->start; 1131 tmp_start = range->start;
1132 flag = FALSE; 1132 flag = 0;
1133 1133
1134 while ((len_tmp = res_cur->start - 1 - tmp_start) >= res->len) { 1134 while ((len_tmp = res_cur->start - 1 - tmp_start) >= res->len) {
1135 if ((tmp_start % tmp_divide) == 0) { 1135 if ((tmp_start % tmp_divide) == 0) {
1136 flag = TRUE; 1136 flag = 1;
1137 len_cur = len_tmp; 1137 len_cur = len_tmp;
1138 start_cur = tmp_start; 1138 start_cur = tmp_start;
1139 break; 1139 break;
@@ -1158,17 +1158,17 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
1158 if ((len_tmp < len_cur) || (len_cur == 0)) { 1158 if ((len_tmp < len_cur) || (len_cur == 0)) {
1159 if (((res_prev->end + 1) % tmp_divide) == 0) { 1159 if (((res_prev->end + 1) % tmp_divide) == 0) {
1160 /* just perfect, starting address's divisible by length */ 1160 /* just perfect, starting address's divisible by length */
1161 flag = TRUE; 1161 flag = 1;
1162 len_cur = len_tmp; 1162 len_cur = len_tmp;
1163 start_cur = res_prev->end + 1; 1163 start_cur = res_prev->end + 1;
1164 } else { 1164 } else {
1165 /* Needs adjusting */ 1165 /* Needs adjusting */
1166 tmp_start = res_prev->end + 1; 1166 tmp_start = res_prev->end + 1;
1167 flag = FALSE; 1167 flag = 0;
1168 1168
1169 while ((len_tmp = res_cur->start - 1 - tmp_start) >= res->len) { 1169 while ((len_tmp = res_cur->start - 1 - tmp_start) >= res->len) {
1170 if ((tmp_start % tmp_divide) == 0) { 1170 if ((tmp_start % tmp_divide) == 0) {
1171 flag = TRUE; 1171 flag = 1;
1172 len_cur = len_tmp; 1172 len_cur = len_tmp;
1173 start_cur = tmp_start; 1173 start_cur = tmp_start;
1174 break; 1174 break;
@@ -1217,17 +1217,17 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
1217 if ((len_tmp < len_cur) || (len_cur == 0)) { 1217 if ((len_tmp < len_cur) || (len_cur == 0)) {
1218 if ((range->start % tmp_divide) == 0) { 1218 if ((range->start % tmp_divide) == 0) {
1219 /* just perfect, starting address's divisible by length */ 1219 /* just perfect, starting address's divisible by length */
1220 flag = TRUE; 1220 flag = 1;
1221 len_cur = len_tmp; 1221 len_cur = len_tmp;
1222 start_cur = range->start; 1222 start_cur = range->start;
1223 } else { 1223 } else {
1224 /* Needs adjusting */ 1224 /* Needs adjusting */
1225 tmp_start = range->start; 1225 tmp_start = range->start;
1226 flag = FALSE; 1226 flag = 0;
1227 1227
1228 while ((len_tmp = range->end - tmp_start) >= res->len) { 1228 while ((len_tmp = range->end - tmp_start) >= res->len) {
1229 if ((tmp_start % tmp_divide) == 0) { 1229 if ((tmp_start % tmp_divide) == 0) {
1230 flag = TRUE; 1230 flag = 1;
1231 len_cur = len_tmp; 1231 len_cur = len_tmp;
1232 start_cur = tmp_start; 1232 start_cur = tmp_start;
1233 break; 1233 break;
@@ -1281,17 +1281,17 @@ int ibmphp_check_resource (struct resource_node *res, u8 bridge)
1281 if ((len_tmp < len_cur) || (len_cur == 0)) { 1281 if ((len_tmp < len_cur) || (len_cur == 0)) {
1282 if ((range->start % tmp_divide) == 0) { 1282 if ((range->start % tmp_divide) == 0) {
1283 /* just perfect, starting address's divisible by length */ 1283 /* just perfect, starting address's divisible by length */
1284 flag = TRUE; 1284 flag = 1;
1285 len_cur = len_tmp; 1285 len_cur = len_tmp;
1286 start_cur = range->start; 1286 start_cur = range->start;
1287 } else { 1287 } else {
1288 /* Needs adjusting */ 1288 /* Needs adjusting */
1289 tmp_start = range->start; 1289 tmp_start = range->start;
1290 flag = FALSE; 1290 flag = 0;
1291 1291
1292 while ((len_tmp = range->end - tmp_start) >= res->len) { 1292 while ((len_tmp = range->end - tmp_start) >= res->len) {
1293 if ((tmp_start % tmp_divide) == 0) { 1293 if ((tmp_start % tmp_divide) == 0) {
1294 flag = TRUE; 1294 flag = 1;
1295 len_cur = len_tmp; 1295 len_cur = len_tmp;
1296 start_cur = tmp_start; 1296 start_cur = tmp_start;
1297 break; 1297 break;
@@ -1684,7 +1684,7 @@ static int __init once_over (void)
1684 bus_cur = list_entry (tmp, struct bus_node, bus_list); 1684 bus_cur = list_entry (tmp, struct bus_node, bus_list);
1685 if ((!bus_cur->rangePFMem) && (bus_cur->firstPFMem)) { 1685 if ((!bus_cur->rangePFMem) && (bus_cur->firstPFMem)) {
1686 for (pfmem_cur = bus_cur->firstPFMem, pfmem_prev = NULL; pfmem_cur; pfmem_prev = pfmem_cur, pfmem_cur = pfmem_cur->next) { 1686 for (pfmem_cur = bus_cur->firstPFMem, pfmem_prev = NULL; pfmem_cur; pfmem_prev = pfmem_cur, pfmem_cur = pfmem_cur->next) {
1687 pfmem_cur->fromMem = TRUE; 1687 pfmem_cur->fromMem = 1;
1688 if (pfmem_prev) 1688 if (pfmem_prev)
1689 pfmem_prev->next = pfmem_cur->next; 1689 pfmem_prev->next = pfmem_cur->next;
1690 else 1690 else
@@ -2129,7 +2129,7 @@ static int __init update_bridge_ranges (struct bus_node **bus)
2129 pfmem->start = start_address; 2129 pfmem->start = start_address;
2130 pfmem->end = end_address + 0xfffff; 2130 pfmem->end = end_address + 0xfffff;
2131 pfmem->len = pfmem->end - pfmem->start + 1; 2131 pfmem->len = pfmem->end - pfmem->start + 1;
2132 pfmem->fromMem = FALSE; 2132 pfmem->fromMem = 0;
2133 2133
2134 ibmphp_add_resource (pfmem); 2134 ibmphp_add_resource (pfmem);
2135 } 2135 }