Commit 52aa0b18 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by David S. Miller

net: vxge: Declare the function vxge_reset_all_vpaths as void

variable 'status' is unneeded and it's noneed to check the
return value of function vxge_reset_all_vpaths,so declare
it as void.
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 163d01c5
......@@ -87,7 +87,7 @@ static unsigned int bw_percentage[VXGE_HW_MAX_VIRTUAL_PATHS] =
module_param_array(bw_percentage, uint, NULL, 0);
static struct vxge_drv_config *driver_config;
static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
static void vxge_reset_all_vpaths(struct vxgedev *vdev);
static inline int is_vxge_card_up(struct vxgedev *vdev)
{
......@@ -1606,7 +1606,6 @@ static void vxge_config_ci_for_tti_rti(struct vxgedev *vdev)
static int do_vxge_reset(struct vxgedev *vdev, int event)
{
enum vxge_hw_status status;
int ret = 0, vp_id, i;
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
......@@ -1709,14 +1708,7 @@ static int do_vxge_reset(struct vxgedev *vdev, int event)
netif_tx_stop_all_queues(vdev->ndev);
if (event == VXGE_LL_FULL_RESET) {
status = vxge_reset_all_vpaths(vdev);
if (status != VXGE_HW_OK) {
vxge_debug_init(VXGE_ERR,
"fatal: %s: can not reset vpaths",
vdev->ndev->name);
ret = -EPERM;
goto out;
}
vxge_reset_all_vpaths(vdev);
}
if (event == VXGE_LL_COMPL_RESET) {
......@@ -1969,9 +1961,8 @@ static enum vxge_hw_status vxge_rth_configure(struct vxgedev *vdev)
}
/* reset vpaths */
static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
static void vxge_reset_all_vpaths(struct vxgedev *vdev)
{
enum vxge_hw_status status = VXGE_HW_OK;
struct vxge_vpath *vpath;
int i;
......@@ -1986,18 +1977,16 @@ static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
"vxge_hw_vpath_recover_"
"from_reset failed for vpath: "
"%d", i);
return status;
return;
}
} else {
vxge_debug_init(VXGE_ERR,
"vxge_hw_vpath_reset failed for "
"vpath:%d", i);
return status;
return;
}
}
}
return status;
}
/* close vpaths */
......@@ -2676,11 +2665,7 @@ static int vxge_set_features(struct net_device *dev, netdev_features_t features)
/* !netif_running() ensured by vxge_fix_features() */
vdev->devh->config.rth_en = !!(features & NETIF_F_RXHASH);
if (vxge_reset_all_vpaths(vdev) != VXGE_HW_OK) {
dev->features = features ^ NETIF_F_RXHASH;
vdev->devh->config.rth_en = !!(dev->features & NETIF_F_RXHASH);
return -EIO;
}
vxge_reset_all_vpaths(vdev);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment