src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_add_root_node(struct ice_port_info *pi,
			struct ice_aqc_txsched_elem_data *info)
{
	struct ice_sched_node *root;
	struct ice_hw *hw;

	if (!pi)
		return ICE_ERR_PARAM;

	hw = pi->hw;

	root = (struct ice_sched_node *)ice_malloc(hw, sizeof(*root));
	if (!root)
		return ICE_ERR_NO_MEMORY;

	/* coverity[suspicious_sizeof] */
	root->children = (struct ice_sched_node **)
		ice_calloc(hw, hw->max_children[0], sizeof(*root));
	if (!root->children) {
		ice_free(hw, root);
		return ICE_ERR_NO_MEMORY;
	}

	ice_memcpy(&root->info, info, sizeof(*info), ICE_DMA_TO_NONDMA);
	pi->root = root;
	return ICE_SUCCESS;
}
/**
 * ice_sched_add_root_node - Insert the Tx scheduler root node in SW DB
 * @pi: port information structure
 * @info: Scheduler element information from firmware
 *
 * This function inserts the root node of the scheduling tree topology
 * to the SW DB.
 */
Insert the Tx scheduler root node in SW DB
@pi: port information structure
@info: Scheduler element information from firmware

This function inserts the root node of the scheduling tree topology
to the SW DB.
Insert the Tx scheduler root node in SW DB @pi : port information structure @info : Scheduler element information from firmware This function inserts the root node of the scheduling tree topology to the SW DB .
static enum ice_status
ice_sched_add_root_node(struct ice_port_info *pi,
			struct ice_aqc_txsched_elem_data *info)
{
	struct ice_sched_node *root;
	struct ice_hw *hw;
	if (!pi)
		return ICE_ERR_PARAM;
	hw = pi->hw;
	root = (struct ice_sched_node *)ice_malloc(hw, sizeof(*root));
	if (!root)
		return ICE_ERR_NO_MEMORY;
	root->children = (struct ice_sched_node **)
		ice_calloc(hw, hw->max_children[0], sizeof(*root));
	if (!root->children) {
		ice_free(hw, root);
		return ICE_ERR_NO_MEMORY;
	}
	ice_memcpy(&root->info, info, sizeof(*info), ICE_DMA_TO_NONDMA);
	pi->root = root;
	return ICE_SUCCESS;
}
static enum ice_status ice_sched_add_root_node ( struct ice_port_info * pi , struct ice_aqc_txsched_elem_data * info ) { struct ice_sched_node * root ; struct ice_hw * hw ; if ( ! pi ) return ICE_ERR_PARAM ; hw = pi -> hw ; root = ( struct ice_sched_node * ) ice_malloc ( hw , sizeof ( * root ) ) ; if ( ! root ) return ICE_ERR_NO_MEMORY ; root -> children = ( struct ice_sched_node * * ) ice_calloc ( hw , hw -> max_children [ 0 ] , sizeof ( * root ) ) ; if ( ! root -> children ) { ice_free ( hw , root ) ; return ICE_ERR_NO_MEMORY ; } ice_memcpy ( & root -> info , info , sizeof ( * info ) , ICE_DMA_TO_NONDMA ) ; pi -> root = root ; return ICE_SUCCESS ; }
ice_sched_add_root_node - Insert the Tx scheduler root node in SW DB
 @pi: port information structure
 @info: Scheduler element information from firmware
ice_sched_add_root_node - Insert the Tx scheduler root node in SW DB @pi : port information structure @info : Scheduler element information from firmware
/* coverity[suspicious_sizeof] */