aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.c
diff options
context:
space:
mode:
authorJon Mason <jon.mason@exar.com>2010-11-30 18:43:26 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-12-23 15:53:09 -0500
commit1d3c16a818e992c199844954d95c17fd7ce6cbba (patch)
tree6f54b4153b8f7e54bdb5a8abc3ceffa7b4eec0e2 /drivers/net/sfc/falcon.c
parent2f671e2dbff6eb5ef4e2600adbec550c13b8fe72 (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/net/sfc/falcon.c')
-rw-r--r--drivers/net/sfc/falcon.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 267019bb2b15..1763b9a7fd8e 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -1066,22 +1066,9 @@ static int falcon_reset_hw(struct efx_nic *efx, enum reset_type method)
1066 1066
1067 /* Restore PCI configuration if needed */ 1067 /* Restore PCI configuration if needed */
1068 if (method == RESET_TYPE_WORLD) { 1068 if (method == RESET_TYPE_WORLD) {
1069 if (efx_nic_is_dual_func(efx)) { 1069 if (efx_nic_is_dual_func(efx))
1070 rc = pci_restore_state(nic_data->pci_dev2); 1070 pci_restore_state(nic_data->pci_dev2);
1071 if (rc) { 1071 pci_restore_state(efx->pci_dev);
1072 netif_err(efx, drv, efx->net_dev,
1073 "failed to restore PCI config for "
1074 "the secondary function\n");
1075 goto fail3;
1076 }
1077 }
1078 rc = pci_restore_state(efx->pci_dev);
1079 if (rc) {
1080 netif_err(efx, drv, efx->net_dev,
1081 "failed to restore PCI config for the "
1082 "primary function\n");
1083 goto fail4;
1084 }
1085 netif_dbg(efx, drv, efx->net_dev, 1072 netif_dbg(efx, drv, efx->net_dev,
1086 "successfully restored PCI config\n"); 1073 "successfully restored PCI config\n");
1087 } 1074 }
@@ -1092,7 +1079,7 @@ static int falcon_reset_hw(struct efx_nic *efx, enum reset_type method)
1092 rc = -ETIMEDOUT; 1079 rc = -ETIMEDOUT;
1093 netif_err(efx, hw, efx->net_dev, 1080 netif_err(efx, hw, efx->net_dev,
1094 "timed out waiting for hardware reset\n"); 1081 "timed out waiting for hardware reset\n");
1095 goto fail5; 1082 goto fail3;
1096 } 1083 }
1097 netif_dbg(efx, hw, efx->net_dev, "hardware reset complete\n"); 1084 netif_dbg(efx, hw, efx->net_dev, "hardware reset complete\n");
1098 1085
@@ -1100,11 +1087,9 @@ static int falcon_reset_hw(struct efx_nic *efx, enum reset_type method)
1100 1087
1101 /* pci_save_state() and pci_restore_state() MUST be called in pairs */ 1088 /* pci_save_state() and pci_restore_state() MUST be called in pairs */
1102fail2: 1089fail2:
1103fail3:
1104 pci_restore_state(efx->pci_dev); 1090 pci_restore_state(efx->pci_dev);
1105fail1: 1091fail1:
1106fail4: 1092fail3:
1107fail5:
1108 return rc; 1093 return rc;
1109} 1094}
1110 1095