[PATCH v3 1/7] ethdev: support report register names and filter
Stephen Hemminger
stephen at networkplumber.org
Tue Feb 20 16:14:46 CET 2024
On Tue, 20 Feb 2024 18:58:17 +0800
Jie Hai <haijie1 at huawei.com> wrote:
> int
> rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
> +{
> + struct rte_dev_reg_info reg_info = { 0 };
> + int ret;
> +
> + if (info == NULL) {
> + RTE_ETHDEV_LOG_LINE(ERR,
> + "Cannot get ethdev port %u register info to NULL",
> + port_id);
> + return -EINVAL;
> + }
> +
> + reg_info.length = info->length;
> + reg_info.data = info->data;
> + reg_info.names = NULL;
> + reg_info.filter = NULL;
Those NULL assignments are unnecessary, already initialized structure.
More information about the dev
mailing list