git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
pci
/
hotplug
/
ibmphp_core.c
diff --git
a/drivers/pci/hotplug/ibmphp_core.c
b/drivers/pci/hotplug/ibmphp_core.c
index
0392e00
..
e13d5b8
100644
(file)
--- a/
drivers/pci/hotplug/ibmphp_core.c
+++ b/
drivers/pci/hotplug/ibmphp_core.c
@@
-235,12
+235,12
@@
static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
{
int rc = 0;
struct slot *pslot;
{
int rc = 0;
struct slot *pslot;
- u8 cmd
;
+ u8 cmd
= 0x00; /* avoid compiler warning */
debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n",
(ulong) hotplug_slot, value);
ibmphp_lock_operations();
debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n",
(ulong) hotplug_slot, value);
ibmphp_lock_operations();
- cmd = 0x00; // avoid compiler warning
+
if (hotplug_slot) {
switch (value) {
if (hotplug_slot) {
switch (value) {
@@
-1077,7
+1077,7
@@
static int enable_slot(struct hotplug_slot *hs)
if (rc) {
err("Adding this card exceeds the limitations of this bus.\n");
err("(i.e., >1 133MHz cards running on same bus, or "
if (rc) {
err("Adding this card exceeds the limitations of this bus.\n");
err("(i.e., >1 133MHz cards running on same bus, or "
- ">2 66 PCI cards running on same bus
\n.
");
+ ">2 66 PCI cards running on same bus
.\n
");
err("Try hot-adding into another bus\n");
rc = -EINVAL;
goto error_nopower;
err("Try hot-adding into another bus\n");
rc = -EINVAL;
goto error_nopower;
@@
-1141,7
+1141,7
@@
static int enable_slot(struct hotplug_slot *hs)
goto error_power;
}
goto error_power;
}
- slot_cur->func = k
m
alloc(sizeof(struct pci_func), GFP_KERNEL);
+ slot_cur->func = k
z
alloc(sizeof(struct pci_func), GFP_KERNEL);
if (!slot_cur->func) {
/* We cannot do update_slot_info here, since no memory for
* kmalloc n.e.ways, and update_slot_info allocates some */
if (!slot_cur->func) {
/* We cannot do update_slot_info here, since no memory for
* kmalloc n.e.ways, and update_slot_info allocates some */
@@
-1149,7
+1149,6
@@
static int enable_slot(struct hotplug_slot *hs)
rc = -ENOMEM;
goto error_power;
}
rc = -ENOMEM;
goto error_power;
}
- memset(slot_cur->func, 0, sizeof(struct pci_func));
slot_cur->func->busno = slot_cur->bus;
slot_cur->func->device = slot_cur->device;
for (i = 0; i < 4; i++)
slot_cur->func->busno = slot_cur->bus;
slot_cur->func->device = slot_cur->device;
for (i = 0; i < 4; i++)
@@
-1240,9
+1239,9
@@
int ibmphp_do_disable_slot(struct slot *slot_cur)
}
flag = slot_cur->flag;
}
flag = slot_cur->flag;
- slot_cur->flag =
TRUE
;
+ slot_cur->flag =
1
;
- if (flag ==
TRUE
) {
+ if (flag ==
1
) {
rc = validate(slot_cur, DISABLE);
/* checking if powered off already & valid slot # */
if (rc)
rc = validate(slot_cur, DISABLE);
/* checking if powered off already & valid slot # */
if (rc)
@@
-1252,13
+1251,12
@@
int ibmphp_do_disable_slot(struct slot *slot_cur)
if (slot_cur->func == NULL) {
/* We need this for fncs's that were there on bootup */
if (slot_cur->func == NULL) {
/* We need this for fncs's that were there on bootup */
- slot_cur->func = k
m
alloc(sizeof(struct pci_func), GFP_KERNEL);
+ slot_cur->func = k
z
alloc(sizeof(struct pci_func), GFP_KERNEL);
if (!slot_cur->func) {
err("out of system memory\n");
rc = -ENOMEM;
goto error;
}
if (!slot_cur->func) {
err("out of system memory\n");
rc = -ENOMEM;
goto error;
}
- memset(slot_cur->func, 0, sizeof(struct pci_func));
slot_cur->func->busno = slot_cur->bus;
slot_cur->func->device = slot_cur->device;
}
slot_cur->func->busno = slot_cur->bus;
slot_cur->func->device = slot_cur->device;
}