diff options
author | Jon Mason <jon.mason@exar.com> | 2010-11-30 18:43:26 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-12-23 15:53:09 -0500 |
commit | 1d3c16a818e992c199844954d95c17fd7ce6cbba (patch) | |
tree | 6f54b4153b8f7e54bdb5a8abc3ceffa7b4eec0e2 /drivers/scsi | |
parent | 2f671e2dbff6eb5ef4e2600adbec550c13b8fe72 (diff) |
PCI: make pci_restore_state return void
pci_restore_state only ever returns 0, thus there is no benefit in
having it return any value. Also, a large majority of the callers do
not check the return code of pci_restore_state. Make the
pci_restore_state a void return and avoid the overhead.
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ipr.c | 8 | ||||
-rw-r--r-- | drivers/scsi/pmcraid.c | 7 |
2 files changed, 2 insertions, 13 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 5bbaee597e88..524d586c3147 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -7487,16 +7487,10 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd) | |||
7487 | { | 7487 | { |
7488 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; | 7488 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; |
7489 | volatile u32 int_reg; | 7489 | volatile u32 int_reg; |
7490 | int rc; | ||
7491 | 7490 | ||
7492 | ENTER; | 7491 | ENTER; |
7493 | ioa_cfg->pdev->state_saved = true; | 7492 | ioa_cfg->pdev->state_saved = true; |
7494 | rc = pci_restore_state(ioa_cfg->pdev); | 7493 | pci_restore_state(ioa_cfg->pdev); |
7495 | |||
7496 | if (rc != PCIBIOS_SUCCESSFUL) { | ||
7497 | ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); | ||
7498 | return IPR_RC_JOB_CONTINUE; | ||
7499 | } | ||
7500 | 7494 | ||
7501 | if (ipr_set_pcix_cmd_reg(ioa_cfg)) { | 7495 | if (ipr_set_pcix_cmd_reg(ioa_cfg)) { |
7502 | ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); | 7496 | ipr_cmd->s.ioasa.hdr.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 300d59f389da..321cf3ae8630 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -2228,12 +2228,7 @@ static void pmcraid_ioa_reset(struct pmcraid_cmd *cmd) | |||
2228 | /* Once either bist or pci reset is done, restore PCI config | 2228 | /* Once either bist or pci reset is done, restore PCI config |
2229 | * space. If this fails, proceed with hard reset again | 2229 | * space. If this fails, proceed with hard reset again |
2230 | */ | 2230 | */ |
2231 | if (pci_restore_state(pinstance->pdev)) { | 2231 | pci_restore_state(pinstance->pdev); |
2232 | pmcraid_info("config-space error resetting again\n"); | ||
2233 | pinstance->ioa_state = IOA_STATE_IN_RESET_ALERT; | ||
2234 | pmcraid_reset_alert(cmd); | ||
2235 | break; | ||
2236 | } | ||
2237 | 2232 | ||
2238 | /* fail all pending commands */ | 2233 | /* fail all pending commands */ |
2239 | pmcraid_fail_outstanding_cmds(pinstance); | 2234 | pmcraid_fail_outstanding_cmds(pinstance); |