return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_init, -ENOTSUP);
(*dev->dev_ops->bypass_init)(dev);
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_state_show, -ENOTSUP);
(*dev->dev_ops->bypass_state_show)(dev, state);
return 0;
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_state_set, -ENOTSUP);
(*dev->dev_ops->bypass_state_set)(dev, new_state);
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_state_show, -ENOTSUP);
(*dev->dev_ops->bypass_event_show)(dev, event, state);
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_event_set, -ENOTSUP);
(*dev->dev_ops->bypass_event_set)(dev, event, state);
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_timeout_set, -ENOTSUP);
(*dev->dev_ops->bypass_wd_timeout_set)(dev, timeout);
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_ver_show, -ENOTSUP);
(*dev->dev_ops->bypass_ver_show)(dev, ver);
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_timeout_show, -ENOTSUP);
(*dev->dev_ops->bypass_wd_timeout_show)(dev, wd_timeout);
return -ENODEV;
}
- if ((dev= &rte_eth_devices[port_id]) == NULL) {
- PMD_DEBUG_TRACE("Invalid port device\n");
- return -ENODEV;
- }
+ dev = &rte_eth_devices[port_id];
FUNC_PTR_OR_ERR_RET(*dev->dev_ops->bypass_wd_reset, -ENOTSUP);
(*dev->dev_ops->bypass_wd_reset)(dev);