ChangeSet 1.947.23.9, 2003/02/05 17:20:29+11:00, rddunlap@osdl.org [PATCH] PCI Hotplug: checker patches Fixes problems found by the CHECKER program in the pci hotplug drivers diff -Nru a/drivers/hotplug/cpqphp_pci.c b/drivers/hotplug/cpqphp_pci.c --- a/drivers/hotplug/cpqphp_pci.c Thu Feb 6 14:51:47 2003 +++ b/drivers/hotplug/cpqphp_pci.c Thu Feb 6 14:51:47 2003 @@ -1193,7 +1193,7 @@ if (temp != func->config_space[cloop >> 2]) { dbg("Config space compare failure!!! offset = %x\n", cloop); dbg("bus = %x, device = %x, function = %x\n", func->bus, func->device, func->function); - dbg("temp = %x, config space = %x\n\n", temp, func->config_space[cloop]); + dbg("temp = %x, config space = %x\n\n", temp, func->config_space[cloop >> 2]); return 1; } } diff -Nru a/drivers/hotplug/ibmphp_pci.c b/drivers/hotplug/ibmphp_pci.c --- a/drivers/hotplug/ibmphp_pci.c Thu Feb 6 14:51:47 2003 +++ b/drivers/hotplug/ibmphp_pci.c Thu Feb 6 14:51:47 2003 @@ -1621,23 +1621,23 @@ } for (i = 0; i < count; i++) { - if (cur_func->io[count]) { - debug ("io[%d] exists \n", count); + if (cur_func->io[i]) { + debug ("io[%d] exists \n", i); if (the_end > 0) - ibmphp_remove_resource (cur_func->io[count]); - cur_func->io[count] = NULL; + ibmphp_remove_resource (cur_func->io[i]); + cur_func->io[i] = NULL; } - if (cur_func->mem[count]) { - debug ("mem[%d] exists \n", count); + if (cur_func->mem[i]) { + debug ("mem[%d] exists \n", i); if (the_end > 0) - ibmphp_remove_resource (cur_func->mem[count]); - cur_func->mem[count] = NULL; + ibmphp_remove_resource (cur_func->mem[i]); + cur_func->mem[i] = NULL; } - if (cur_func->pfmem[count]) { - debug ("pfmem[%d] exists \n", count); + if (cur_func->pfmem[i]) { + debug ("pfmem[%d] exists \n", i); if (the_end > 0) - ibmphp_remove_resource (cur_func->pfmem[count]); - cur_func->pfmem[count] = NULL; + ibmphp_remove_resource (cur_func->pfmem[i]); + cur_func->pfmem[i] = NULL; } }